Draft proposal: allow the use of relational operators on Comparable classes (original) (raw)
Tom Hawtin Thomas.Hawtin at Sun.COM
Thu Mar 19 09:41:02 PDT 2009
- Previous message: Draft proposal: allow the use of relational operators on Comparable classes
- Next message: Draft proposal: allow the use of relational operators on Comparable classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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).
- Previous message: Draft proposal: allow the use of relational operators on Comparable classes
- Next message: Draft proposal: allow the use of relational operators on Comparable classes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]