
A Java Syntax Quirk - raganwald
http://blog.uncommons.org/2008/08/24/a-java-syntax-quirk/
======
thwarted
I'm not sure why this is a quirk. The reader has overloaded the meaning of an
identifier followed by a colon and a string following two slashes. All inputs
must be considered in context. A bare URL has no meaning in Java, so the given
construct must not be a URL if it parses and does not produce an error.

I mean, are we expecting the parser to output "You didn't meant to put a URL
on line X"?

------
nuclear_eclipse
What is the point of allowing labels in Java when goto is not available? Is
there some other way of using/referencing labels that I am unaware of?

~~~
13ren
break. One usecase: you have loops nested 3 deep, and you want to end it all
when you find something. You label the outermost loop "exit", and then say
"break exit;"

I think continue can use labels, too. ( _EDITED_ )

~~~
jamongkad
Forgive me but this is going to be a bit off topic. I think it's considered
poor taste when a hacker decides to utilize nested loops 3 levels deep.

~~~
ricky_clarkson
I consider it poor taste when a hacker uses a loop (other than a tail call).
Nesting is irrelevant.

~~~
gdee
oh... the height of silliness...

