Re: New switch/case idea
- Posted by mattlewis (admin) Apr 06, 2009
- 1705 views
jeremy said...
mattlewis said...
Yes, I suppose it doesn't make much sense. We could ignore the first if block for a naked break, but that might lead to more confusion than it's worth, due to the changing nature of break.
I wonder, not changing it, because it would indeed be confusing, but giving a warning if a break is given inside of an if statement w/no label? It almost always means an error. In fact, it would always mean an error? Maybe it should be an error actually? When would it ever be a good thing?
It could be 'useful' if you jumped around using goto.
Matt