Live data from Hacker News

My thoughts after using Clojure for about a month

acdw.net

61–70 of 204 posts

Re: My thoughts after using Clojure for about a month

#61
post #6

With respect, this topic in particular has been beaten to death. I too liked Clojure when I tried it some years ago (agreed on the composition and data structures; both are _great_). But the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang -- I am talking concurrency / parallelism here (for memory management I…

Clojure is about its rigorous and pragmatic "immutability first" paradigm that you simply don't get from other PLs.

LISP is much more than just a runtime syntax, such as its distinct evaluation model and metalinguistic core.

The JVM was chosen for Clojure because of its reach and vast ecosystem. People have ported Clojure to other runtimes, even Beam (Clojerl), where it enjoys decent success, too.

Re: My thoughts after using Clojure for about a month

#62
post #6

With respect, this topic in particular has been beaten to death. I too liked Clojure when I tried it some years ago (agreed on the composition and data structures; both are _great_). But the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang -- I am talking concurrency / parallelism here (for memory management I…

> Programming language syntax scarcely matters.

Certainly it matters much less in the modern era.

However, certain fundamental decisions of a language can be dealbreakers.

Requiring declarations on your functions and giving those declarations sigils so that they can be parsed quickly is an important syntax decision. Almost every modern programming language has converged to this idea.

Or take, for example, Lua. For me, personally, the 1-based-ness of Lua is simply a dealbreaker no matter how good anything else about it is.

For the "Lisps", I LOATHE the fact that you traverse lists and vectors in completely different ways--you can't just drop any container-ish thing into something that iterates/collects it. This is something that both Clojure and Racket seem to agree on--you have something that acts like a "collection" and you can walk across it the same way regardless of the specific type of collection it is. Of course, that is why a bunch of Lisp purists loathe Clojure and Racket while I like those languages. Shrug.

I find RAII (Resource acquisition is initialization) to be the source of all things evil if it infests a programming language. The popularity of C++ and Rust speaks to the quite large number of people who think my opinion is bullshit.

So, yeah, base syntax matters far less than it used to. But the engineering decisions that went into making that syntax correspondingly are far more important.

Re: My thoughts after using Clojure for about a month

#63
post #6

With respect, this topic in particular has been beaten to death. I too liked Clojure when I tried it some years ago (agreed on the composition and data structures; both are _great_). But the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang -- I am talking concurrency / parallelism here (for memory management I…

Clojure is about its rigorous and pragmatic "immutability first" paradigm that you simply don't get from other PLs. LISP is much more than just a runtime syntax, such as its distinct evaluation model and metalinguistic core. The JVM was chosen for Clojure because of its reach and vast ecosystem. People have ported Clojure to other runtimes, even Beam (Clojerl), where it enjoys decent success, too.

All true. And I loved trying Clojure for 3-4 weeks some years ago.

Still want Erlang's runtime though i.e. the many green threads with share-nothing architecture that can communicate with each other.

Re: My thoughts after using Clojure for about a month

#64
post #50

Earlier quoted context omitted.

The programming language informs the design of the system. As I said in my earlier comment, an idiomatic Java codebase is going to be designed very differently to an idiomatic Clojure codebase, even if they both intend to solve the same problem.

Those differences are not due to the syntax, they're due to much deeper things like the differing type system.

I'm not sure I agree. Certainly there are differences other than syntax, but that doesn't mean syntax is irrelevant. For instance, would Clojure programmers use maps as much if there was no syntax for map literals?

Syntax determines what parts of a language are within easy reach, and therefore affects how programmers use the language. Tools that a syntax make easy are used often; tools that syntax makes hard are used infrequently. This indirectly impacts how a piece of software is designed.

Re: My thoughts after using Clojure for about a month

#65

Earlier quoted context omitted.

What can the Erlang / Golang runtimes do that the JVM can’t?

Thousands of share-nothing actors (fibers / green-threads) with first-class support for communication between them, for a start. Erlang/Elixir -- immutability as well.

"As a rule of thumb, if your application never has 10,000 virtual threads or more, it is unlikely to benefit from virtual threads."

https://docs.oracle.com/en/java/javase/21/core/virtual-threa...

Re: My thoughts after using Clojure for about a month

#66
post #6

With respect, this topic in particular has been beaten to death. I too liked Clojure when I tried it some years ago (agreed on the composition and data structures; both are _great_). But the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang -- I am talking concurrency / parallelism here (for memory management I…

Yeah, the content + feel felt like I'm reading this in 2013.

Re: My thoughts after using Clojure for about a month

#67

Earlier quoted context omitted.

Thousands of share-nothing actors (fibers / green-threads) with first-class support for communication between them, for a start. Erlang/Elixir -- immutability as well.

"As a rule of thumb, if your application never has 10,000 virtual threads or more, it is unlikely to benefit from virtual threads." https://docs.oracle.com/en/java/javase/21/core/virtual-threa...

Obviously. But it's really nice to have the option, and none of us knows the future. I've been bitten by those "0.1% chance" things much more times than I would be not-embarrassed to admit, and I know I a not alone.

Re: My thoughts after using Clojure for about a month

#68

Earlier quoted context omitted.

What can the Erlang / Golang runtimes do that the JVM can’t?

Thousands of share-nothing actors (fibers / green-threads) with first-class support for communication between them, for a start. Erlang/Elixir -- immutability as well.

What kind of software actually requires this? Honest question. Anything I can think of would probably be written by C++ devs

Re: My thoughts after using Clojure for about a month

#69
post #62
post #6

With respect, this topic in particular has been beaten to death. I too liked Clojure when I tried it some years ago (agreed on the composition and data structures; both are _great_). But the real value-add is in the runtime, not the syntax. Java has a solid runtime but it's not yet as good as Erlang's, maybe even not up to the standards of Golang -- I am talking concurrency / parallelism here (for memory management I…

> Programming language syntax scarcely matters. Certainly it matters much less in the modern era. However, certain fundamental decisions of a language can be dealbreakers. Requiring declarations on your functions and giving those declarations sigils so that they can be parsed quickly is an important syntax decision. Almost every modern programming language has converged to this idea. Or take, for example, Lua. For me…

I think we can easily agree they are two entities (syntax / runtime) that feed off of each other. And I do agree that previously the syntax mattered more.

(I very much agree on Lua btw.)

Personally I am very disheartened. Surely algebraic data types should be universally a good thing and all PLs should gradually adopt them? But no, endless HN / Reddit threads bike-shedding.

Oh well.

Re: My thoughts after using Clojure for about a month

#70
post #68

Earlier quoted context omitted.

Thousands of share-nothing actors (fibers / green-threads) with first-class support for communication between them, for a start. Erlang/Elixir -- immutability as well.

What kind of software actually requires this? Honest question. Anything I can think of would probably be written by C++ devs

Web / API services during bursts. Or just when you _really_ don't want to scale horizontally.

Elixir / Golang can do this very well. And they do. I have supervised, led and authored such projects that are in production to this day.

Rust too but it's lower-level and you kind of have to hand-roll OTP which of course will always fail.

Post reply on HN