News for hackers. Stuff that matters.
Re:Java at 30: The Genius Behind the Code That Changed Tech by Zambyte on Friday May 16, 2025 @07:41PM (#44010785)
For syntax, maybe this general Lisp advice will help: consider a normal function call, like f(a, b). To make this into a Lisp function call, drop the unnecessary comma (whitespace is enough to separate tokens) like f(a b), and then move the function name inside the parentheses, like (f a b). Applying operators that are considered "primitive" in other languages are syntactically treated the same as functions. So imagine an add function like add(a, b), but instead of being named 'add', it's just named '+', like +(a, b). Applying the same transformation as before, this turns into (+ a b).

Using the function application syntax for primitives like + is nice because you get the same flexibility of normal functions, like variable argument length: (+ a b c).

Clojure is a little bit less uniform than other Lispy languages in that it has special brackets for lists (square brackets) and for maps (curly brackets), but that's pretty much it.

Re:Java at 30: The Genius Behind the Code That Changed Tech by fuzztester on Friday May 16, 2025 @09:55PM (#44011464)
it also has the threading operator or macro.

i am not a clojure or lisp expert, just saying.

Re:Java at 30: The Genius Behind the Code That Changed Tech by shawn_w on Friday May 16, 2025 @11:58PM (#44011942)
Clojure style threading macros are readily available for common lisp and scheme. Probably emacs lisp too.
Re:Java at 30: The Genius Behind the Code That Changed Tech by fuzztester on Monday May 19, 2025 @08:07PM (#44036351)
interesting, thanks.