|
|
|
|
|
by stevekl
4299 days ago
|
|
I am not a functional programmer and I always find that when I read clojure it just looks like layers and layers of nested code. Personally, I find it visually hard to parse. Can someone enlighten me why clojure seems to be the trending language? |
|
More concretely, Clojure's mechanisms for abstraction are both simple and extensible. You can create interfaces (called protocols) for writing polymorphic and efficient code against both your own and existing library classes. Transducers, the topic of the article, are an incredible abstraction that allows you to write powerful transforming functions on sequences of data that are not tied to any concrete representation. This means the same transducers you write will work on lazy sequences, non-lazy collections, and even values asynchronously put on core.async channels (a library for asynchronous programming in Clojure).
I think most languages look weird when you first see them and are unfamiliar with their syntax. But if you give it a chance, the nesting that seems confusing at first might actually come to be something you appreciate.