Re:Try Clojure
by ReleaseCandidat on Wednesday May 22, 2024 @03:23PM
(#40445122)
> Use math operators in higher order functions:
To be fair, there just needs to be syntax for passing infix functions as a "normal" function, like parens in Haskell
(reduce [1 2 3] +)
foldl' (+) 0 [1, 2, 3]
And to allow `?` in names, it "just" shall not be used elsewhere.
No operator precedence rules to remember.
Use math operators in higher order functions:
Simpler parser in the language.Use kebab-case variable names.
Use most symbols in variable names.
The last two are because of reduced ambiguity in the language. The benefits for readability can be huge. For example, I love question marks for predicates in Scheme.
I'm sure there are more benefits that I haven't thought of.