Re: Anonymous methods, blocks etc. (Cont. 'default block params')
- From: Gavin Kistner <gavin@xxxxxxxxxxxx>
- Date: Tue, 1 Nov 2005 23:20:00 +0900
On Oct 31, 2005, at 9:18 PM, zdennis wrote:
Yukihiro Matsumoto wrote:|Is the -> syntax still open for debate Matz? I agree with Austin on |this. The syntax here is just ugly.Here are some of my thoughts on the syntax "->(a=5,b=1){ }" to denote it as ugly.
It's always open. But define "ugly" first.
My additions (as another non-fan of this syntax):
* It's a pain to type on a US English keyboard. Under 'proper' typing, I believe the right right finger is required for both characters, timed with a shift key press for the second one. Despite the verbosity, I find typing "lambda" to be faster than typing "->". And "def" is even easier ;)
* It points the wrong way. I don't know how to convince anyone of this, but in my heart of hearts it's like a right hand side missing it's left. With something like: foo = <- (a,b){ ... } it looks like the arrow takes all the stuff on the right hand side and converts it into something that's available on the left hand side. The syntax being discussed can only be justified (by me) as some sort of symbolic link or something. "You were expecting a value here? Quick, look to the right!"
Ugly, like beauty, is in the eye of the beholder. Sometimes it's hard to quantify or rationalize. It's just...ugly (to me).
.
- Follow-Ups:
- References:
- Prev by Date: Re: qtruby problems now on linux
- Next by Date: Re: [ANN] Rant 0.4.8
- Previous by thread: Re: Anonymous methods, blocks etc. (Cont. 'default block params')
- Next by thread: Re: Anonymous methods, blocks etc. (Cont. 'default block params')
- Index(es):
Relevant Pages
|