Fw: [jsr-335-eg] Default method survey results

Daniel Heidinga Daniel_Heidinga at ca.ibm.com
Thu Sep 20 09:01:24 PDT 2012



(Apologies for the delay in responding to this issue - I'm experiencing
email issues with new list)

If we count Kevin's late vote, the survey ends in a tie.  My inclination
would be to then fall back to the result of the vote at JVM Languages
Summit EG meeting - the 'default' keyword should be placed between the
signature and the body.

I don't want to drag this topic out too much further, but I think there are
two pretty compelling reasons to avoid 'default' as a method modifier:

1) Users believe package access is 'default access' regardless of what the
spec says and will be surprised that default means something else.  Because
we're introducing a lot of new concepts in this JSR, we should be careful
to avoid perturbing user's mental models when we can.  This is clearly a
case where we can avoid the mismatch between what the user expects and what
the new concept means.

2) Precedent matters - the annotation example is a clear precedent for
placing 'default' between the signature and body.  We've strived to respect
precedent so far (when appropriate, of course) and the annotation example
is a clear match to what we're trying to do.

Let's run one more EG poll on this issue - a straight choice between:
	A) void foo() default { ... }
	B) default void foo() { ... }
and let that decide the issue.

--Dan


More information about the lambda-spec-observers mailing list