Syntax decision

Brian Goetz brian.goetz at oracle.com
Fri Sep 30 17:25:37 PDT 2011


> Arguably Java method declaration syntax is weird too:
>      name(args){body}
> for anyone new to programming. But the syntax has been in mainstream
> for 4 decades, so everybody is accustomed to it. That's why I don't
> really understand why the strawman syntax, closest to method
> declaration, is killed; I read the archive and couldn't find any
> objection to it. (I have no intention to argue about syntax, just
> curious to learn what's wrong with strawman syntax; ignore me if you
> would)

The only thing going for the strawman syntax was that if you squinted 
and pronounced # as "method", it looked like the method declaration 
syntax.  But, it was broadly hated for so many reasons, including:
  - Some people just hated the #, it felt like being hit over the head 
with a hammer labeled "watch out, something new and different here!"
  - Some people had a hard time seeing #(x)(x) as one expression, rather 
than two
  - Visual confusion with casts.

While all the options had supporters and detractors, strawman elicited 
the strongest negative reaction from its detractors.  If you look at the 
"too terse and too alien" thread from June 2010, you'll see some initial 
reactions from this group.  While people later softened their stance 
(likely through familiarity), the negative reactions were just too strong.

Basically, while it might have been the most "logical" syntax, we're not 
logical beings.


More information about the lambda-dev mailing list