You need to know the rest of the documentation to -get- these.
These seem par for the course, and are probably what fluent programmers would use. Except it's a recursive way to get there.
I came to see the function usage, like a dumb java developer, and got plonked with a short story on sort-by usage patterns.
That's a learning curve too steep for someone who came expecting some constants or keywords to plugin to my function and get some documented behaviour variation.
Problem is in Clojure, opening each blackbox is just as much effort as it is to turn a page, but then your mind has to load that function definition too, and it becomes too much.
I am still struggling with the paradigm shift, ie, constants/keywords etc are just functions and vice versa.
Java typically does dispatch on constants or enum keywords - aka an if -else clause.
Clojure (and functional programs) use functions to decide dispatch.. a function is a constant and a thing, as opposed to a machine's maw like I imagine in Java
I expect these complaints will disappear linearly with lines-of-code written, and I'll not be confused by seq anymore
Video notes:
Clojure is a data processing language.
The language mirrors the structure of data
(being a homoiconic language, it feels like the data is executable)
(Lisp is ListProcessing is the closest to a Turing machine )
(homoiconic - Freddie Mercury)
Can we do a whole web app with just clj-http, clj-sql etc ?
References:
https://clojuredocs.org/clojure.core/sort-by
https://www.youtube.com/watch?v=C-kF25fWTO8&t=1364s
0 Comments:
Post a Comment
<< Home