Hi Sean,
This is a matter of opinion and you can certainly find a lot of smart people on both sides.
The reason I don't like REST, at a philosophical level, is because I feel it constrains what can be expressed. APIs are built out of nouns (objects) and verbs (methods on those objects). In pure REST, you only get four verbs: "create" (post), "read" (get), "update" (put), "delete", aka CRUD. Any other action you might want to do -- say, "increment play count" -- typically needs to be implemented via read-modify-write.
But this read-modify-write loses information about exactly what the user was trying to do. Inevitably, the server is forced to reverse-engineer these actions by diffing the resource before and after the change. There's a bunch of reasons why a server needs to know specific actions, not just before-and-after:
- Authorization: The user might be authorized to increment the play count, but not decrement it, or may be authorized to modify some fields but not others.
- Audit logging: If you want to keep a log of actions, you probably want them to be semantic actions like "incremented play count", not "overwrote the resource with new content".
- Concurrency: If two users modify the resource at the same time, you want to be able to merge those changes. Merging streams of semantic actions is typically trivial -- just accept one action at a time and execute them in order. But merging two PUTs is hard; if you just perform them in order, the first one gets obliterated by the second.
- Public vs. private: Often the format you expose in your API is not the true underlying format of your storage, and may not be an exact representation. You may even have intentionally private information. You don't want a PUT to obliterate the private bits. Relatedly, you want to be able to evolve your storage format without old clients constantly deleting the new data whenever they do a read-modify-write.
- Non-storage behavior: APIs which aren't just glorified interfaces to a database have trouble with REST. For example, imagine an API for a game where the client controls a character moving around in a 3D world. How the heck are you going to represent that with REST? I'm sure you could think of something, but it's going to be weird.
In our programming languages, we define classes with methods. Those methods are not limited to getters and setters -- in fact, good interfaces often avoid getters and setters altogether, preferring higher-level methods representing semantic operations. We have decades of experience saying that this is the right thing. What makes the web different?
Cap'n Proto aims to extend the same object-oriented model we're used to in our programming languages to distributed systems (while accounting for network issues and providing tools to work with them, rather than trying to hide them as CORBA did). You can always define an interface limited to CRUD verbs if that's what you really want, but Cap'n Proto doesn't think you should be limited to that.
With all that said, you can of course use Cap'n Proto serialization in a regular RESTful API.
-Kenton