Sometimes Java is just weird
vsadt.com
Sometimes Java is just weird
1–10 of 19 posts
Re: Sometimes Java is just weird
#2Also, I am not sure rewording the title added any value. The title of the article IMO was just fine - See http://ycombinator.com/newsguidelines.html
Re: Sometimes Java is just weird
#3> # 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
#4Perhaps I am nitpicking here - but it's "weird" not "wierd". Also, I am not sure rewording the title added any value. The title of the article IMO was just fine - See http://ycombinator.com/newsguidelines.html
Re: Sometimes Java is just weird
#5The 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!
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
#6The 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
#7Re: Sometimes Java is just weird
#8And that is why this particular parser won't pass the Java TCKs.
Re: Sometimes Java is just weird
#9There are that many Han characters alone, so I’m not sure what the surprise is. It’s not like you have to hard-code them in your grammar.
If anything, I’d hope that new languages in 2010 allow any of the roughly 100,000 non-control non-whitespace [edit: non-punctuation] Unicode characters. For a lot of the code I see, ASCII is at least as constraining as, say, fixnums would be.
Re: Sometimes Java is just weird
#10I understand the need for localization and all, but 46 THOUSAND characters? Jeez. There are that many Han characters alone, so I’m not sure what the surprise is. It’s not like you have to hard-code them in your grammar. If anything, I’d hope that new languages in 2010 allow any of the roughly 100,000 non-control non-whitespace [edit: non-punctuation] Unicode characters. For a lot of the code I see, ASCII is at least…