From: Jakub Hegenbart Date: 2008-05-06T21:07:59+09:00 Subject: Re: lambda, ->, haskell, and so on On Fri, May 2, 2008 at 4:52 AM, M. Edward (Ed) Borasky wrote: > Joel VanderWerf wrote: > > > M. Edward (Ed) Borasky wrote: > > > > > Lisp programmers aren't too lazy to type the word "lambda" -- why should > Ruby or other languages be different in that respect? :) > > > > > > > Lisp programmers keep in shape by doing reps of SHIFT-9 and SHIFT-0 ;) > > > > > Actually, most Lisp "IDEs" (emacs et. al.) give you a matching SHIFT-0 when > you type the SHIFT-9. You just have to remember to move the entry cursor to > the right place. > > I really should learn emacs. ;) To reply to all of you :-), I noticed that many die-hard lispers are using Paredit, which actually does reduce the need to write parentheses to a minimum (and it does a whole lot more). I can gladly recommend trying Paredit to anyone who would like to experience what "intelligent editor" is actually supposed to mean - it never allows you to have your parentheses unbalanced, it allows you to safely swap and move and transpose and shuffle subexpressions around and so on. The shift modifier might also be unnecessary, it is not difficult to swap '[' and ']' for '(' and ')' in Emacs, which mimics the Lisp Machine keyboard of olde ;-) (http://world.std.com/~jdostale/kbd/SpaceCadet1.jpeg), even doing it just for the Lisp mode of Emacs helps. There is no need to do the unnecessary work. Concerning lambdas: I am also unsure about the ->(){} syntax, but then, I am no expert in languages heavy with syntax. Historically, I have been much more uncomfortable with lambda{|x|} not establishing a new binding for x whenever there was an x in the outer scope already, which is a history now. :-) Lispers do not complain too much about (lambda (...) ...), but again, they are not using it that often anyway - at least in Common Lisp, macros having &body at their end are quite common and you do not need to pass the body as a lambda to them. It is Scheme where the lambdas are more prevalent, I would say, but at least in DrScheme, � works as lambda anyway, and they even have a keybinding for it - CTRL+\. In Gauche Scheme, I do just (define � lambda). Hmm, I guess I'm either conservative or not-too-demanding. :-) Regards Jakub Hegenbart