Expected distribution of lambda sizes (Re: Syntax poll, take 2)

Stephen Colebourne scolebourne at joda.org
Fri Jun 17 07:41:14 PDT 2011


On 17 June 2011 14:02, John Nilsson <john at milsson.nu> wrote:
> On Fri, Jun 17, 2011 at 11:58 AM, Reinier Zwitserloot
> <reinier at zwitserloot.com> wrote:
>> regardless of the size of the body of a for, if, or while statement, a
>> large chunk of the java community puts that body in a block. I'll go out on
>> a limb and claim that this has some relevance to how a large chunk of the
>> java community ends up writing their closure literals.
>
> Now does this statistics correlate with an actual styling preference,
> or is it just and indication of people generally sticking to the
> "defaults" of their IDE?

Chicken and egg? No, I don't think so. This "Java-style" was
established before IDEs in my view.

The style in any language is established from a number of sources,
including the source code of the language itself,
examples/documentation, previous experience and the aesthetics of
early adopters. The IDEs have IMO just followed existing practice
decided in the first year or two of the language.

Now for lambdas, the IDE vendors can setup default style/layout any
way the like, and their choices will be based on discussions here and
in the EG.

However, the simple point some of us are making is that there *is* an
existing style within Java communities. Ignoring that or hoping that
lambdas will change it radically seems like a mistake. Of course,
whether the syntax of lambdas should "pander" to that style is open to
debate.

Stephen


More information about the lambda-dev mailing list