Re: AspectJ: solution to Java's repetitiveness?
On Apr 20, 5:50 pm, Lew <l...@lewscanon.com> wrote:
Futhermore, Java really isn't all that verbose. For Pete's sake, you ca=
n
acquire an entire monitor and synchronize threads with one keyword, ooh, b=
ig
overhead.
While I fundamentally agree with you, Lew, there *are* places where
Java is painfully verbose. The amount of typing required for closures
- anonymous classes - is ridiculous compared to other languages. And,
while there are certainly lots of ways to hurt yourself with closures,
there are many times when they're useful, too: just look at Spring's
FooCallback (HibernateCallback, JdbcCallback, etc) interfaces and
consider how much cleaner they'd be to use with a shorter syntax.
There are proposals in the works to streamline this aspect of Java;
"concise instance creation expressions" introduces the smallest
semantic changes (no new language constructs, only new syntax), and
there is also a proposal for full-blown closures and lambda
expressions from Bloch and others. We'll see what falls out.
-o