Draft proposal: allow the use of relational operators on Comparable classes (original) (raw)
Reinier Zwitserloot reinier at zwitserloot.com
Fri Mar 20 08:17:07 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 ]
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).
- 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 ]