Live data from Hacker News

Why I like Clojure

sulami.github.io

21–30 of 155 posts

Re: Why I like Clojure

#21
post #11

One (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…

>Also I find Clojure a little dogmatic in regards to mutation

I don't think it's dogmatic (which I would say has a negative connotation) but simply opinionated because fundamentally at the heart of clojure seems to be a concurrency model that heavily relies on immutability to make sense, so it's a logical consequence of that design choice.

And I think it's an appropriate one because the mutable thread and lock world that we get in mutable imperative languages is honestly a little bit insane.

Re: Why I like Clojure

#22
> While the primary platform is the JVM, superbly uncool but stable and relatively performant

My impression was that java has the reputation of being "uncool" but JVM is highly regarded as modern marvel.

I am wrong about this ?

Re: Why I like Clojure

#23
post #18

Earlier quoted context omitted.

Clojure being dogmatic is the reason I love it.

Agreed. While I don’t always agree with its dogma, without it I don’t think I’d still be using Clojure, yet here I am ten years after first learning it. Clojure is great because it takes a strong stance on how certain things should be done.

yep. also, i think learning how clojure's dogmas synergize with each other is the determining factor in whether one is a clojurist for life or not.

Re: Why I like Clojure

#24

Earlier quoted context omitted.

Python is not as flexible as Lisp in a manner of AST manipulation

Python's approach seems to be: expose functionality like the AST for the 31337 ninjas that really want to go there, while maintaining intense focus on producing a KISS tool for the other 95% of its audience.

A lot of (most?) of the benefit of macros comes not from writing them yourself, but from using macros that others have written. Even if only 5% of the people are writing macros, that 5% likely includes many library authors. Making it harder for them impacts their downstream users too, even if those people aren't actually writing macros.

IMO the macros in Clojure make it easier for library authors to produce KISS, high-level interfaces for the rest of us.

Re: Why I like Clojure

#25

> While the primary platform is the JVM, superbly uncool but stable and relatively performant My impression was that java has the reputation of being "uncool" but JVM is highly regarded as modern marvel. I am wrong about this ?

It just depends who you ask of course, but that is the idea you get. The JVM is pretty cool tech with many languages running on it that are considered cooler than Java.

Re: Why I like Clojure

#26

> While the primary platform is the JVM, superbly uncool but stable and relatively performant My impression was that java has the reputation of being "uncool" but JVM is highly regarded as modern marvel. I am wrong about this ?

My impression is that this perception is because of the slow garbage collection on JVM which eats up lots of cycles. Also all JVM languages tend to consume a lot of memory.

Re: Why I like Clojure

#27

> 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.

Re: Why I like Clojure

#28

Need someone to explain why I should use clojure over scala because typelevel seems pretty well developed

Speaking as a professional Scala developer I can’t explain why you’d use one over the other. They are very different yet I know people that successfully develop and ship software using one or the other. I think it comes down to personal preference

Re: Why I like Clojure

#29

Need someone to explain why I should use clojure over scala because typelevel seems pretty well developed

Clojure: live repl into running code

Scala:

Clojure: Explore the problem you are facing with quick prototyping in the repl and see the blind spots, the unknowns, the shape of data received from flaky integrations. Mold and shape your functions as the problem becomes clearer.

Scala: Best it can do is write unit tests and the debugger to look at what exactly is happening, devise a bunch of classes to handle them, rinse repeat and of course wait hours for recompiles. Refactor when new unknowns surface and curse at the fucking compiler not knowing what type it should be inferring.

Clojure programmers are done before Scala has a test environment up.

Re: Why I like Clojure

#30

Need someone to explain why I should use clojure over scala because typelevel seems pretty well developed

Not going into this explanation (as I believe the qualities of languages can only be assessed through experience, not theoretical arguments), but I, and many others, have been through Scala with high hopes before finally settling for Clojure - this should tell you that there are indeed good reasons for favouring it.

An analogy to pique your curiosity: I would say that if Java was a balloon, Scala would be a zeppelin, and Clojure would be a plane.

I would also say that the stewardship of Clojure is much saner than that of Scala, due to a strong emphasis on stability. Typesafe / Lightbend is bigger than Cognitect, but big does not mean reliable. One sign of this is that Clojure now grows via libraries, the core having reached stability. Scala is still figuring out its fundamental semantics.

Post reply on HN