3 ms·
I don't know of any such variant, and I've looked. There seems to be nothing. I had this idea too, and I implemented it, see my comment here[0]. The readabilit
by djedr 5y ago
I don't know of any such variant, and I've looked. There seems to be nothing. I had this idea too, and I implemented it, see my comment here[0].
The readability argument is arguably subjective -- `fn` can be seen as special on either side of the paren -- either way it's special because it's the thing next to the paren.
The syntax is certainly more familiar for most people who had anything to do with math or ALGOL-like languages.
What is objective about this syntax though is that it removes nesting for curried functions (see the linked comment for details). I think this is the right idea.
[0] https://news.ycombinator.com/item?id=27625295 https://news.ycombinator.com/item?id=27625295