REST and transpositions
$author says:
It takes a while to get the hang of exposing an algorithm as a set of resources. Instead of thinking in terms of actions ("do I search for places on the map"), you need to think in terms of the results of that action ("the list places on the map matching a search criteria").
And this looks to me like functional programming: idempotent, safe functions turned inside out, so that they are named and used by referring to their return value. So, we treat sqrt(2) just like any other number, in a sense, not a command to compute 1.4142135...
As $author says earlier in the book:
You can then bookmark that page and come back to it later. You can link to it on a web page of your own. You can email the URI to someone else. If HTTP wasn’t addressable, you’d have to download the whole page and send the HTML file as an attachment.
Yeah, instead of saying sqrt(2) when needed, we would need to use assignment and mutable state. And then hell breaks loose...

Add your comment