Похожие чаты

Is this a matter of engine implementation?

10 ответов

25 просмотров

I'm not sure what you're asking

Nop

Perlik-Yubenji Автор вопроса
Thomas
Nop

doesn't make sense. The block should only evaluate if the case matches. Are we in agreement on that?

Perlik-Yubenji Автор вопроса
Thomas
No

my chromium says yes

Perlik-Yubenji Автор вопроса
Thomas
No, it doesn't, try 25

aah. I see. missed this part "If break is omitted, the program continues execution at the next statement in the switch statement. " that's really weird. So case without a break is pretty useless.

Perlik Yubenji
aah. I see. missed this part "If break is omitted,...

That's the idea, and it makes the entire switch pretty useless too

Perlik-Yubenji Автор вопроса
Thomas
That's the idea, and it makes the entire switch pr...

I would think it has to do with decidability logic i.e. where logic scoped to a case ends. then replacing with braces rather than colon might be a 💡idea (I think)

Perlik Yubenji
I would think it has to do with decidability logic...

But you still need break, braces only protects against variable definition leakage

Похожие вопросы

Обсуждают сегодня

Карта сайта