Regarding Java lacking events, look at C#'s event keyword. Java provides the same, just not with pleasant syntax. I think that's what the poster meant.
Annotation processors - too much like magic. Scala's DSLs are written in the language and don't require anything other than a library. You don't have to worry about two DSLs conflicting with each other (ignoring implicit conflicts for a moment) and they don't make classloading or compilation any more difficult. I'm not just promoting Scala here, Java could really use what JavaFX has been failing to deliver all these years, a decent DSL for graphical applications. Personally I'd rather see more effort put into making Swing behave as native (e.g., the same menus when you right-click in a JTextField as in any other application), and begin to throw exceptions on badly threaded Swing code - with an option to just run it anyway of course. On Wed, May 2, 2012 at 6:43 AM, Fabrizio Giudici < [email protected]> wrote: > On Wed, 02 May 2012 11:30:04 +0200, Casper Bang <[email protected]> > wrote: > > > I don't want an annotation processor; I want the generic abstractions I >> use >> everyday to be baked into the language as first class constructs. Any >> > > I think it's difficult nowadays to have wide consensus on this. An > annotation is a first-class construct and it's Java's way to be enhanced. > In Scala events are pretty elegant when I look at Akka, but as I understand > they are not baked into the language; they are implemented on the top of > DSL-like flexibility that Scala offers (including operator overloading). To > me it's precisely what Java does, even though it's a rougher (?) approach > of course. > > To me in the end the important part is that syntax is clear, semantics are > precise and I don't have to do something strange to have it working. > Putting a jar in the classpath it's not strange. > > Note that I'm not arguing *against* having baked in support for events in > a language. I'm so event oriented that I'd appreciate it. But as I've said > in the past, I'm not keen to see many new constructs in Java and I prefer > to see it extended in other ways. But this has nothing to do with Swing - > we're back discussing on languages. I think Scala can use Swing and have > pretty nice events that "look" baked in the language (while, of course, > Scala can't do anything with obsolete Swing APIs). > > > -- > Fabrizio Giudici - Java Architect, Project Manager > Tidalwave s.a.s. - "We make Java work. Everywhere." > [email protected] > http://tidalwave.it - http://fabriziogiudici.it > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to javaposse+unsubscribe@** > googlegroups.com <javaposse%[email protected]>. > For more options, visit this group at http://groups.google.com/** > group/javaposse?hl=en <http://groups.google.com/group/javaposse?hl=en>. > > -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
