I’m not sure what the reasoning was here. I hope the author or others can shed some light.
I’m not sure what the reasoning was here. I hope the author or others can shed some light.
Idris2, I can't comment much. All I know is that I envy its unification algorithm and synthesis features. Its syntax is more haskellish, if you like that. It seems less mature in some aspects, though. Very promising language overall.
For me, these projects (such as HVM) are great research stuff showing us how to do (or not do) things.
From my point of view, the author almost made it into s-expressions, but decided not to go all the way, which (imo) would have been amazing and the "cleanest" (although I don't like using the term "clean" for code, it's so subjective). I'd like to have some light shed over the decision not to go all the way.
A `let` could assume un-even amount of forms in it and only evaluate the last one, using the other ones as bindings.
Example from your README:
(Main n) =
let size = (\* n 1000000)
let list = (Range size Nil)
(Fold list λaλb(+ a b) 0)
(define Main (n)
(let size (\* n 1000000)
list (Range size Nil)
(Fold list λaλb(+ a b) 0)))
Could even get rid of the parenthesis for arguments (`(n)` => `n`) and treating forms inside `define` the same as `let`.Good point.
> Could even get rid of the parenthesis for arguments (`(n)` => `n`) and treating forms inside `define` the same as `let`.
No, because non-curried functions are a feature. If we did that, every function would be curried. Which is nice, but non-curried functions are faster (lots of lambdas and wasteful copies are avoided using the equational rewrite notation), so they should be definitely accessible.
Many questions arise, for a small amount of benefit (imo), so not sure it's worth it.