On 09.03.2018 21:48, fo...@univ-mlv.fr wrote: [...]
but in a switch, you can not delay the creation of a case (technically you can because you can always do weird thing but, it's not what people will expect), so disallowing int i = 0; switch(foo) { case 0 -> { i++; } } make little sense.
but what you would do is not that, it is:
int i = 0; i += switch(foo) { case 0 -> 1 > default -> 0; }
which also means to be forced to move to a more functional style. Maybe you can show more examples?
bye Jochen