3 ms·
I watched a fascinating presentation and when I saw the speaker typing (lambda ...) and having it change to (λ ...) and not having to deal with parens.. I was j
by m463 7y ago
I watched a fascinating presentation and when I saw the speaker typing (lambda ...) and having it change to (λ ...) and not having to deal with parens.. I was jealous.
Does emacs do this?
EDIT: the presentation:
William Byrd on "The Most Beautiful Program Ever Written"
https://www.youtube.com/watch?v=OyfBQmvr2Hc https://www.youtube.com/watch?v=OyfBQmvr2Hc
- Jim_Heckler 7y agoYes, M-x prettify-symbols-mode, it's very cool. For parens, there's the built-in electric-pair-mode, paredit, smartparens, and lispy.
- dTal 7y agoSome languages understand λ directly (and in all lisps that support unicode, you can explicitly alias it) - I've occasionally mapped AltGr+L to λ, when playing with those. It's really nice. APL perhaps goes a little far, but I'd like to see more standardized symbols in programming languages. Imagine how nice it would be to succinctly use things like the actual outer-product operator ⊗...
- m463 7y ago> APL perhaps goes a little far When I learned APL long ago in a languages course, it was on a dedicated APL setup with an APL keyboard. In that context, it was a "how SHOULD things be" sort of design decision. I know I started off quickly thinking in terms of math and the language, not composing symbols. Of course, APL keyboards have gone the way of the dodo and so the language has a higher barrier to entry.
- vindarel 7y agoYou can also use shorter lambda forms: https://github.com/CodyReichert/awesome-cl#lambda-shorthands https://github.com/CodyReichert/awesome-cl#lambda-shorthands