3 ms·
Isn't a functional language supposed to be function centric?
by m0skit0 10y ago
Isn't a functional language supposed to be function centric?
- _halgari 10y agoSure, but what do those functions do? In clojure they manipulate data. That's pretty much the gist of the language: using pure functions to manipulate data. Almost all the work I do these days as a software engineer is data transformation. Going from a HTTP request, which is data (even the header is a hashmap), and a HTTP body, which is data, into some business logic that eventually writes to a database in a different format. Even the most complex systems I've built containing dozens of servers and multiple databases, queues, http servers, etc. All boil down to transforming data from format A to format B perhaps with conditional logic applied. So yes, Clojure is a functional language, but functions are just a tool to be used to get the actual work done of transforming data.
- macmac 10y agoClojure's rich persistent data structures together with protocols facilitates functional programming in Clojure. When Clojure is called a data-centric I think most users mean that it encourages functional programming applied to rich immutable data.