3 ms·
Why don't we stop fucking around and just use λx y→x+y?
by anon_c 15y ago
Why don't we stop fucking around and just use λx y→x+y?
- pavpanchekha 15y agoBecause typing a lambda is not obvious on US keyboards.
- gcr 15y agoA shame, too. At least decent editors make this a tad easier. DrRacket, for example, binds lambda to Ctrl+\. Racket accepts both "lambda" and "λ" as the same thing, so it's up to personal preference.
- pavpanchekha 15y agoI'm well aware of how DrRacket works; nonetheless, telling a newbie to type "lambda" will lead to typing, and telling them to type a lambda will lead to griping. Also, the difficulty of typing lambdas also means that writing blogs about code, or documents, or emails, will require even more pain.
- anon_c 15y agoI use RFC 1345 digraphs in vim to type unicode characteres. In RFC 1234, λ is l* and → is ->. To type the above, I just input l_*x y -_>x+y where _ means backspace. This is easy to learn, fast to type, and covers most of the useful unicode characters.
- deleted 15y ago[deleted]
- wladimir 15y agoI agree. It's sometimes a pity that even with full unicode support nowadays we still resort to 'ASCII art' to express syntax in programming languages, reducing legibility. This is not so much a problem of US keyboards, because code editors could easily support the extra characters as part of the language support.
- tikhonj 15y agoYou can just configure your editor to figure out when \x y -> x + y is equal to λx y→x+y and replace the symbols as appropriate. I have Emacs set up to do this for Haskell, so I really have the best of both worlds (mostly): I can type the former expression but it looks like that latter.