Documentation of Project Coin features as implemented in the JDK 7 developer preview
Stephen Colebourne
scolebourne at joda.org
Wed Mar 9 10:20:16 PST 2011
I saw this in the original draft and meant to comment on it being odd.
Having read this discussion though, I agree with allowing '< >' with
space on the basis that its just a reduced '<Foo>'. So, anything a
regular '< X >' allows, should be allowed by diamond.
Stephen
On 9 March 2011 17:37, Joe Darcy <joe.darcy at oracle.com> wrote:
> Hello.
>
> As noted in subsequent discussion, the "diamond operator" isn't really
> an operator and we have taken to not referring to it as such. For
> consistency, I think it is fine to allow (but discourage) extra white
> space between the "<" and ">" characters of a diamond. I find this
> similar to the allowable white space between the "@" and type name of
> an annotation.
>
> Cheers,
>
> -Joe
>
> Maurizio Cimadamore wrote:
>> On 09/03/11 12:57, Ulf Zibis wrote:
>>
>>> Why do you allow whitespace between the "<" and">" of a diamond.
>>>
>> Good catch - I don't think this is a spec problem, as the grammar for
>> diamond is defined as follows in the latest draft:
>>
>> /TypeArgumentsOrDiamond:/
>>
>> /TypeArguments/
>>
>> |<||>|
>>
>>
>> So it is more a compiler bug erroneously accepting spaces 'inside' the
>> diamond. The compiler should be fixed.
>>
>> Maurizio
>>
>>> Is whitespace allowed for ++ operator e.g.?
>>>
>>> -Ulf
>>>
>>>
>>> Am 09.03.2011 07:40, schrieb Joe Darcy:
>>>
>>>> Joe Darcy wrote:
>>>>
>>>>> Hello.
>>>>>
>>>>> I've posted documentation of the semantics of the Project Coin
>>>>> features as implemented in the JDK 7 developer preview, b130, at:
>>>>> http://cr.openjdk.java.net/~darcy/ProjectCoin/ProjectCoin-Documentation-v0.83.html
>>>>>
>>>>>
>>>>> Before sending in comments or questions about a feature to coin-dev,
>>>>> please read the discussion section after a feature. Many design
>>>>> considerations are discussed in those sections. Additionally, some
>>>>> known bugs in the current implementation are noted in the text. In
>>>>> particular, javac in the JDK 7 developer preview erroneously accepts
>>>>> diamond combined with non-generic classes and accepts some uses of
>>>>> diamond with anonymous inner classes. These bugs will be corrected in
>>>>> future builds.
>>>>>
>>>>> Happy reading,
>>>>>
>>>>> -Joe
>>>>>
>>>> No comments from the coin-dev readership on the posted documentation?
>>>>
>>>> -Joe
>>>>
>>>>
>>>>
>>
>>
>>
>
>
>
More information about the coin-dev
mailing list