2 ms·
For what it's worth, Emacs already does that last thing. As a contrived example borrowed from a post I wrote a while back[1]: \ a b c -> a >= b && b <= c |
by tikhonj 14y ago
For what it's worth, Emacs already does that last thing. As a contrived example borrowed from a post I wrote a while back[1]:
\ a b c -> a >= b && b <= c || a /= c
gets rendered as:
λ a b c → a ≥ b ∧ b ≤ c ∨ a ≢ c
However, this is a bit of a pain to do in general. It works well for common functions and syntax elements, but has to be built into the editor. Doing it more generally would require the author of the initial function to come up with multiple different names for it, which sounds unlikely.
[1]: https://news.ycombinator.com/item?id=4742616 https://news.ycombinator.com/item?id=4742616
- vorg 14y agoYour examples are terser which many programmers would prefer. > Doing it more generally would require the author of the initial function to come up with multiple different names for it, which sounds unlikely. Unlikely for now, but could become more likely in the future.