2cents from an ordinary Java developer

Lawrence Kesteloot lk at teamten.com
Tue Feb 2 21:04:15 PST 2010


Hi Fatih,

> In my opinion fully transparent
> closures increase the expressiveness of the Java language

I think few people would disagree with you. The question is whether
this increased expressiveness would be a net win or lose for
"ordinary" programmers. Since none of us is in this set, we have to
simulate what an ordinary programmer would think when reading such
code or writing it, and what existing mental model the programmer
would approach the problem with. I wish it were as easy as just asking
ordinary programmers, but if I may make an analogy to UI design again,
you can do no worse than asking a user to design a user interface.
That's because users are not good at simulating themselves or others
like them. In fact, even experienced designers are pretty bad at this.
That's why they have hallway usability tests. I wish we could do such
tests with the various options we're throwing around on this list, but
I don't know how to do that in a way that all sides will consider
illuminating.

> Furthermore, I have never understood how two of the most popular
> individuals in Java world can have so fundamentally different opinions

Because they both run simulations of ordinary programmers and their
simulations end up with different results.

(By the way, I think it's great that they have different opinions. I
believe the result will be better than if they were in agreement.)

I might here channel Neal and say that no simulation is necessary, we
already know from Scala that transparent closures are not confusing.
To which I would reply that by the time someone is using Scala for
serious code involving closures, they are no longer in the set of
ordinary programmers. (Apologies to Neal for any incorrect channeling.
:-)

Lawrence


More information about the lambda-dev mailing list