Hacker Newsnew | past | comments | ask | show | jobs | submit | anon_c's commentslogin

Why don't we stop fucking around and just use λx y→x+y?


I 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.


You 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.


Because typing a lambda is not obvious on US keyboards.


I 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.


A 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.


I'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.


Available online.


impure functional programing with tables of closures.


Standard ML. It's simple, well-designed, stable, and consistent.

http://www.itu.dk/~tofte/publ/tips.pdf

http://homepages.inf.ed.ac.uk/stg/NOTES/notes.pdf

A full book. It's good, but don't start with it: http://www.cs.cmu.edu/~rwh/smlbook/


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: