Hacker News new | ask | show | jobs
by cutler 2909 days ago
Is it just me or is Clojure(script) becoming more and more syntax-heavy with each passing year?
3 comments

A subtle advantage of having a macro system is that you only pay the price of having unconventional syntax if you opt into it. You can keep the core language small and push weird syntax into macros, which can be imported like libraries.

The core language of Clojure is pretty small and simple compared with most other languages.

While that is true of the basic building blocks of the language, clojure.spec for example does have an overly verbose syntax (I would define it that way, even though it doesn't introduce new basic syntax elements) for function specs and that was one of the main motivations for writing Ghostwheel.

I wouldn't see this as some sort of development in Clojure though and I don't really know if that's what cutler meant anyway. Maybe he'll elaborate.

Would you care to elaborate? Is there something specific you see in this project that caught your eye? One thing I noticed is the use of ligatures, which is becoming increasingly common as editors embrace Unicode more fully, but that's an editor/presentation feature, not something specific to the language. For example:

  ->  →
  =>  ⇒
  >=  ≥
I've seen an increasing number of people trying out Fira Code, which includes a nice set of such ligatures:

https://github.com/tonsky/FiraCode

The font in the screenshots with the ligatures is in fact Fira Code and the font in the REPL screenshots without ligatures is Ubuntu Mono.

I guess those could be considered additional syntax, but they're also completely optional and interchangeable with the corresponding, more Clojure-like keywords.

Yeah, I wouldn't consider them syntax, either. There's a lot we can do to make our coding environments easier to work in, and that's independent of the source code itself. I'm glad to see more exploration in this space.
I'm not sure what you mean. Clojure(Script) hasn't added any new syntax to the core language in a long, long time.