Yes, and that also decides the type. It HAS to be an expression, there is no way to make the expression block be of the void type, and therefore there is no semi-colon magic as in the BGGA proposal. There MUST be an expression as the last statement, with an actual type. That will also be the type of the expression block.
That makes this proposal a lot simpler than the BGGA blocks. On Feb 24, 10:03 pm, Viktor Klang <[email protected]> wrote: > Looks Scala-esque (in the positive sense) > > So basically the code block is executed once and the very last expression > will be "returned"? > > On Tue, Feb 24, 2009 at 9:22 PM, Reinier Zwitserloot > <[email protected]>wrote: > > > > > Via twitter: > > >http://docs.google.com/Doc?id=ddb3zt39_77cgxvktgs&hl=en > > > I like it, mostly. Less magic as with the BGGA proposal (where the > > final semi-colon or lack thereof decides between a void or a non-void > > return type), and far less impact. > > > Incidentally, my forthcoming unifiying closure proposal (or really any > > other closure proposal) could use familiarity in the community with > > the concept. > > -- > Viktor Klang > Senior Systems Analyst --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
