3 ms·
> The “->” is supposed to be read as a lambda (λ), since relying on unicode characters in code is generally bad news. Interesting. Why? Personally I would rad
by KirinDave 18y ago
> The “->” is supposed to be read as a lambda (λ), since relying on unicode characters in code is generally bad news.
Interesting. Why? Personally I would radically prefer the λ and any competent editor could make it a single keystroke if it doesn't already.
I really wish we did use more unicode in our source code. "≠", for example, is much clearer to me than "!=".
- msie 18y agoWouldn't unicode in source code break a lot of UNIX utilities or render them useless? Just askin'
- tokipin 18y agoHaskell uses \, which isn't too far from λ. it also reads better than -> imo
- etal 18y agoQi uses /. as lambda; that's pretty close. I like Haskell's decisions as well. There's also the literate programming route: enter the code as ASCII, then run it through a processor to generate a prettier document for reading.
- celoyd 18y agoFor some interesting examples of integrated Unicode, have a look at Project Fortress, Guy L. Steele's Fortran-killer.