Re: Anonymous methods, blocks etc. (Cont. 'default block params')



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.
It's always open. But define "ugly" first.
Here are some of my thoughts on the syntax "->(a=5,b=1){ }" to denote it as ugly.

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


.



Relevant Pages

  • Re: Conversion from 2003 to 2005 just too hard
    ... >I understand your pain, Peter - but for about an year and a half, it was ... >pretty obvious that investing time in MC++ code would not be such a smart ... >sales of my book (which targetted the old syntax). ... Isn't it pain in the ass situation to suffer a monololists stategies? ...
    (microsoft.public.dotnet.languages.vc)
  • Re: LDAP Query
    ... Thanks very much - these things can be a pain to find - would you know of ... any documentation to out line some of the syntax? ... MS Exchange FAQ at http://www.swinc.com/resource/exch_faq.htm ...
    (microsoft.public.exchange.admin)
  • Re: Associative array issues with loading values after initialization
    ... Using a PHP editor that actively scans your syntax will save you a lot ... of pain. ... Eclipse with PDT is a good/free/multi-platform. ...
    (php.general)
  • Re: "ifconfig -vlandev" syntax
    ... inconsistencies sneak into their syntax. ... I like the latter since having to type unneeded words ... > deprecate the old syntax so we may need to keep it around. ... survive the pain of syntax change in CURRENT only, ...
    (freebsd-net)
  • Re: Date query stuff
    ... Sorry to be a pain but I am uncertain as to what should be done with ... Does it need to be pasted into the criteria bit of the query or into ... I have tried a couple of methods but Access throws a fit about syntax. ...
    (microsoft.public.access.queries)