We're smithing the syntax together on the lombok googlegroups, which also contains plenty of background on how it works. A fully written out proposal won't happen for quite a while; instead we are going to focus on getting a working eclipse and javac plugin out via project lombok, along with a 'how to' based primarily on examples.
On Nov 6, 11:23 pm, Serge Boulay <[email protected]> wrote: > Reiner, > > Could you please post a link to your closures proposal. > > Thanks > > On 11/6/09, Reinier Zwitserloot <[email protected]> wrote: > > > > > > > > > It's also a ridiculous line of reasoning. Like most things Neal says > > when you attack his proposals, it boils down to overly pedantic drivel > > - technically correct, practically speaking irrelevant or misleading. > > > Take this very argument, for example: How else would nominal generics > > even work? There's no such thing as nominal generics. You could, I > > guess, create something like: > > > public typedef StringList extends List of String; > > > But, as you clearly can't create such a typedef for _every_ type in > > existence out of the box in the java.util package (do we also create a > > StringListListListListMapSetListListSetMap?), the rule would have to > > be that any typedef matching 'List of String' matches any other. > > Regardless of such things as package or name of the typedef. Which is > > simply another take on structural typing. > > > If you think about it for more than 2 seconds, you realise that > > generics fills a role that is all about the structure. Asserting type > > bounds is a fundamentally structural activity. "Nominally typed > > language" does not mean "language devoid of structures"! Thus, > > generics has been implemented structurally, because there is no other > > (practical) way. > > > Contrast this to BGGA, which tosses structural typing in there for no > > good reason. Quite unlike generics, closures aren't specifically > > filling a role that makes sense only with structurally typed > > programming concepts, and doing closures with structural typing isn't > > the only way. In other words, BGGA *chooses* to go the structural > > typing route, whereas the concept of generics itself hardcodes > > structural typing. Quite a big difference, as it has made BGGA far > > more complex than my closure proposal, which still supports as much > > power as BGGA (including full transparency). Possibly turning java > > into a structural/nominal hybrid is a good idea, but I'd rather see 2 > > separate proposals for that instead of the big ball of scary, loosely > > related changes that BGGA has become. > > > But, why not. I'll take back that BGGA's messing with the fundamental > > nature of java's type system is its biggest downside. It's _a_ > > downside. It's got at least 2 more enormous whoppers, none of which > > are relevant to this thread. I'd be glad to participate in a thread > > about the pros and cons, and particularly the pragmatic realities of > > what it takes to even have closures in java (including how some syntax > > pain is unavoidable, something most BGGA dislikers don't really > > understand, and how most of the extreme complexity of the BGGA > > proposal, such as the 'throws E' generics, are not necessary), if you > > and/or others feel that's an interesting discussion to have. Open a > > thread and I'm sure I'll find it. > > > On Nov 6, 5:54 pm, Ben Schulz <[email protected]> wrote: > >> > [...] because java is nominally typed. BGGA's (the closure proposal) > >> > biggest downside is that it turns java into a structural/nominal > >> > hybrid, as it introduces stuff like {String, String => Integer} as a > >> > type, which is obviously structural. > > >> You've asserted that before, prompting a response by none other than > >> Neal Gafter himself [1]: > > >> "Well, not quite. List<String> is the same type as List<String> not > >> (only) because they have the same name, but because they have the same > >> type arguments. That's structural typing, and generics are indeed > >> structurally typed. As are arrays. Java is not strictly nominal. " > > >> Really put's that "biggest downside"-thing into perspective. :P > > >> With kind regards > >> Ben > > >> [1]http://groups.google.com/group/javaposse/browse_thread/thread/702ae90... > > -- > Sent from my mobile device --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
