REST is Functional

Something that hadn't occurred to me, but in retrospect seems obvious now:

It's interesting to note here the connection between REST and functional programming and the meaning of the word 'function'. For most developers a function is a sequence of statements that do some 'work.' But for the few developers using a functional programming language a function is a well defined relationship between an input and output state. RESTful systems manifest the latter, 'functional' meaning of the word 'function'. You might describe such a system as 'B:HTTP(A)' where a given HTTP request acts as a function and is applied to system state A. The application of this function in turn generates a new system state, B. In the end, as Duncan points out, many of benefits that RESTful systems have over SOAP are analagous to the advantages that functional languages have over procedural languages.

This is from a blog called discipline and punish which I've not come across before. Lots of interesting stuff there on OpenID, and a rant on syntax obsession that fits well with a current Talisian discussion.


Other posts tagged as functional-programming, general, rest, technology

Earlier Posts