> While OO seems to be out, and FP the new hotness Funny that. While I prefer FP, and did since I've learned Python, my teachers are really hot about OO, even pushing us to use it in Python projects. (Looking at projects from previous years, they mostly seemed to use Java. Then also because of browser integration and obviously because of the OO UML Project links ?)
Is there any reason to believe FP is the "new hotness". Each year in the Stack overflow language trends report the FP languages are barely making an impact.
Why I like Clojure
31–40 of 155 posts
Re: Why I like Clojure
#32Need someone to explain why I should use clojure over scala because typelevel seems pretty well developed
IMO, less code is better. Clojure is about as terse as you can get and still be readable (by my opinion). Scala is very visually noisy in comparison. While you can do types with Clojure.spec, you get to choose when and use when useful to you.
Rich Hickey is the best communicator of why Clojure is good. Here's a relevant starting point a video talk he gave on the 10 year anniversary of Clojure: https://youtu.be/2V1FtfBDsLU?t=1636
All this said, Scala has more jobs than Clojure in the same way that Java has more jobs than Scala does. It's more Java-like than Clojure (and not just because it isn't Lisp). (And incidentally, only people who haven't tried at all to use Clojure complain about parens ().)
Sadly, I think Javascript is the long-term winner. Python is also a winner, but it doesn't have the front-end reach that JS has (while JS also has server side). Clojure and Clojurescript can do both, and are an awesome choice if you don't mind working alone and having few job opportunities. However, if you want to focus on one language and be able to do a lot of things, and have lots of job opportunities. Javascript is actually the one I would suggest.
Re: Why I like Clojure
#33One (stupid?) thing that annoys me about closure is that native clojure libraries use snake case while java libraries use camel case. You could obviously write a new defn macro to take of all this and make it consistent, but it might have just been a better decision to just make everything camel case, in in Lisp-like fashion. Also I find Clojure a little dogmatic in regards to mutation, more so than even Scheme. I fi…
Re: Why I like Clojure
#34Yes, it's more succinct and elegant but is it worth it?
Re: Why I like Clojure
#35> While OO seems to be out, and FP the new hotness Funny that. While I prefer FP, and did since I've learned Python, my teachers are really hot about OO, even pushing us to use it in Python projects. (Looking at projects from previous years, they mostly seemed to use Java. Then also because of browser integration and obviously because of the OO UML Project links ?)
Is there any reason to believe FP is the "new hotness". Each year in the Stack overflow language trends report the FP languages are barely making an impact.
A recent example is SwiftUI. While Swift is not a FP language, SwiftUI (FP UI framework) and Combine (a FP toolkit) is being pushed by Apple as the future UI architecture for all its OSes.
Re: Why I like Clojure
#36Clojure/Lisp is super nice until you have a bunch of transformations to make then you've to keep everything in mind without having a named reference in front of you (unless you omit the threading operators and abuse the let statement). It becomes exhausting after a while and makes you question if you are working for the machine or the machine is working for you. Yes, it's more succinct and elegant but is it worth it?
Re: Why I like Clojure
#37Clojure/Lisp is super nice until you have a bunch of transformations to make then you've to keep everything in mind without having a named reference in front of you (unless you omit the threading operators and abuse the let statement). It becomes exhausting after a while and makes you question if you are working for the machine or the machine is working for you. Yes, it's more succinct and elegant but is it worth it?
You are absolutely free to decompose computations into more `defn`s, `let` statements, or threading operators. Or mix and match those.
Re: Why I like Clojure
#38> homoiconicity, meaning code can be represented as a data structure inside the same language > generating strings and passing them into eval like for example in Python Python has become a pinata for language enthusiasts? Python lets you pin a decorator on a function, get the AST (a data structure AFAIK), manipulate it in a sane fashion in Python, compile it, return the result. No string munching eval require I'm all…
Re: Why I like Clojure
#39Earlier quoted context omitted.
You are absolutely free to decompose computations into more `defn`s, `let` statements, or threading operators. Or mix and match those.
You are 100% right but I am not writing all the code. My job is mostly maintaining other developers' code. And turns out, languages can have great effect on making not-so-good developer write reasonably good code (Go, for example).
It's certainly possible to converge towards some shared notion of what constitutes maintainable code.
We additionally have an internal styleguide plus some formatter-related tooling.
Re: Why I like Clojure
#40> homoiconicity, meaning code can be represented as a data structure inside the same language > generating strings and passing them into eval like for example in Python Python has become a pinata for language enthusiasts? Python lets you pin a decorator on a function, get the AST (a data structure AFAIK), manipulate it in a sane fashion in Python, compile it, return the result. No string munching eval require I'm all…
A python decorator is just a syntactic sugar for : f = decorator(f) Afaik, the decorator deals with the internal function as a black box. But with lisp being a lisp, the macro writer can choose the level of blackboxiness they want to deal with. Note: I love both Python and Clojure and use them extensively.