Ranter
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
Comments
-
@C0D4 You could also use:
while(condition) { /*some code*/; break }
Or when you need 2 alternative ways
while(condition) { /*some code*/; goto end; } /*alternative code*/ ; end:; -
Or even more unreadable:
void functionCase0(int bla)
{ /*some code*/ }
void functionCase1(int bla)
{ /*some code*/ }
void functionCase2(int bla)
{ /*some code*/ }
void functionCase6(int bla)
{ /*some code*/ }
int main(void)
{
/*some code*/
void (*functionTarget[7]) (int) =
{
[0]=functionCase0,
[1]=functionCase1,
[2]=functionCase2,
[6]=functionCase6,
};
functionTarget[in](5);
return 0;
}
Just make sure in is either 0,1,2 or 6 and not anything else. -
@happygimp0 If you were in my team and wrote code like that, I would quit the company right away lol.
Related Rants
One of my coworker change the code from
```
void foo() {
if (condition)
{
}
else
{
}
}
```
to
```
condition ? ifTrue : ifFalse;
```
and add it to changelog
```
- fix bugs // yes with an "s"
- feature added
- some list of the bug fixed.
```
I refer back to the commit, only one Fucking commit and on changes. Bro, what the fuck?
rant
flutter
dart