News for hackers. Stuff that matters.
Re:Sometimes Java is just weird by Jach on Tuesday November 16, 2010 @11:31AM (#1910574)
The only weird thing to me is this:

> # There are 46,908 different valid characters that you can use in an identifier

And yet among all those characters I can't have a question mark at the end of a boolean variable or function name...

Anyway, weirdness is no excuse for not supporting a feature in a parser!

Re:Sometimes Java is just weird by kleiba on Tuesday November 16, 2010 @11:32AM (#1910584)
That must be because of the ternary operator:

    condition ? result-if-true : result-if-false
although you're probably right that a smarter parser should be able to distinguish between both cases. But then the next guy comes along and complains that he can't use a colon as a valid character in his variable names...
Re:Sometimes Java is just weird by jere_jones on Tuesday November 16, 2010 @11:34AM (#1910591)
Bear in mind that this parser's job is only for syntax highlighting and, later on, refactoring. Hmmm... maybe highlighting literals would be useful. I'll have to think on that.