On Wed, Aug 13, 2014 at 2:27 PM, Rowan Collins <rowan.coll...@gmail.com> wrote:
> Ferenc Kovacs wrote (on 13/08/2014): > >> agree, and I thought about mentioning that, but I left that out, because >> I'm not proposing to remove that ability (and I see more use-cases for that >> as mentioned in my previous email) but stating that this patch would make >> an arbitrary distinction between the normal and the default cases. >> > > I'm not sure I agree that it's arbitrary. Having a switch with two > "default" clauses is like having an if with two "else" clauses; specifying > two case labels which can be true at the same time is like having two > "elseif" clauses chained together that can both be true at the same time. > One is clearly an error; the other is just poorly written logic, and you > can't make the parser outlaw every instance of poor logic. Default is more of a catch all directive than an else (which will only match if nothing else), so I don't think that having two default is more "wrong" than having two "case 2:". -- Ferenc Kovács @Tyr43l - http://tyrael.hu