News for hackers. Stuff that matters.
Re:Relic: Functional relational programming for Clojure(Script) by michaelteter on Monday February 27, 2023 @07:35AM (#34955664)
In most cases, an imperative example in a curly-bracket language (JavaScript as one example) has the same number of parens and curly brackets as a Lisp has in parens. They're just in different places.

And, the non-Lisp languages tend to have more rat droppings => , ; . etc.

f is a function which takes two arguments, adds them, and returns the result.

Clojure: (def my-var ["hello" 123 (f 10 20)]) -> my-var: ["hello" 123 30]

([""()]) -> 8 noisy characters

JavaScript: const my_var = ["hello", 123, f(10, 20)]; -> myVar: ["hello", 123, 30]

=["",,(,)]; -> 11 noisy characters

Obviously this difference becomes more pronounced with longer argument lists or array element counts.

There are no comments on this comment yet.