Modules vs. Packages
Christopher Brind
brindy at brindy.org.uk
Thu Feb 5 02:55:12 EST 2009
Why is a colon so important to named parameters?
@SomeAnnotation(options = 1)
void draw(int x, int y, Color color = BLACK);
Seems to work just as well, (or just as badly, depending on your view
point).
Cheers,
Chris
2009/2/5 Neal Gafter <neal at gafter.com>
> On Wed, Feb 4, 2009 at 10:25 PM, Paul Benedict <pbenedict at apache.org>wrote:
>
>> Joshua Bloch wrote in his latest "Effective Java" book that
>> annotations, when first introduced, missed an opportunity to use the
>> NAME:VALUE notation precedent. If that decision was made, it would be
>> easy enough to expand the language for default parameter values too.
>>
>
> When I first designed the syntax for annotations, I used a colon instead of
> an equals sign for this reason. Josh changed it to the equals sign,
> insisting that Java will never have named parameters. Given that it's too
> late to go back to my original design, his change of heart is little
> consolation.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/jsr294-modularity-observer/attachments/20090205/59cff8e1/attachment.html>
More information about the jsr294-modularity-observer
mailing list