Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Just found out that something like this would actually work in Java:
int a = 2;
switch(a) {
case 1:
int b = 1;
break;
case 2:
b = 2;
}
I know about the variable scoping part, but that doesn't means if the language allows this kind of shitty code you should use it.. Fuck took me 15 mins to resolve the merge conflicts. As during merge the 1st case was partially removed. And the code was filled with these kinds of logic. This could have been done in a minute without the shitty code..
undefined