Draft proposal: allow the use of relational operators on Comparable classes
Reinier Zwitserloot
reinier at zwitserloot.com
Fri Mar 20 08:17:07 PDT 2009
Your average java programmer does not know that the lexer is greedy,
and making knowledge of this mandatory to understand what's happening
when Joe Q. Java sees "5.<.4" is a bad idea.
--Reinier Zwitserloot
On Mar 19, 2009, at 17:41, Tom Hawtin wrote:
> Howard Lovatt wrote:
>> Dots are also a bad solution because you can get confusing
>> expressions:
>>
>> 5.<.4
>>
>> Is this:
>>
>> (5.) < (.4)
>
> This is a lexical issue. The lexer is greedy, so yes the tokens
> would be
> "5." "<" ".4"[1]. I don't believe this lexical issue would be a real
> problem in real code. For instance the expressions "f<.4" and "i.<.4"
> would both work as expected.
>
> Tom
>
> [1] >> and >>> are the only real oddities in Java. As well as being
> double and triple close of generics, they are some obscure operators
> that don't really belong in Java (IMO).
>
More information about the coin-dev
mailing list