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
-
You'll stop laughing once you end up with something like this https://imperialviolet.org/2014/02/...
-
@UnicornPoo Actually, no. People tell me to do it, but i am a little bit shy and i lost hope after some teacher who only want to be right.
-
@electrineer It is stupid mistakes, just like you would forget to put semicolons at "the end of your line".
I personally make my IF statements without brackets, and i've never had issues with that.
In anyway, that means you are making 2 lines more, to be safe but not to make a clean code and that's not part of any convention. -
@suiramdev you could get a bug like that in a merge without actively writing the second line. And you get an error from a missing semicolon, so it's not a problem.
Additional braces won't save you from additional semicolons, though:
@highlight
skip_block = true;
if (!skip_block) ;
{
just_kidding();
this_runs_every_time();
} -
@suiramdev your last comment screams "I'm coding like I want it, fuck everyone else". Not sure if it's intended...
But you just declared you're not a team player and value your own opinion higher than working together on a code base.
It doesn't and should never matter if you like braces or not, as it not only prevents bugs but makes the code more readable for everyone.
In most coding guidelines you will find - no matter what language - braces mandatory for if statements, as it's the sanest approach. -
@IntrusionCM That's not how i wanted to express myself but you are right, looking to my projects and how i am always feeling in team, i actually agree that i am not a "team player".
On my own Personal projects, i actually prefer to remove those brackets because i feel confortable with it, but it is true, it can be realy unconfortable for some peoples.
Related Rants
-
elgringo41Student - Teacher renaming .c to .exe make the program executable ? Teacher - Yes A group of people stand up...
-
kescherRant14Our programming teacher had a surgery on his left eye and will not be able to do the lessons with us. Guess wh...
-
grayfox36* Selects text to copy * * Ctrl + C to copy * * Selects text to be replaced with copied text * * Ctrl + C a...
My teacher just saied that C# naming conventions wan't use to always put brackets on our if statements even though their is only one line next to it.
Where did she get this from ? 😅
rant
naming conventions
stupidity
stupid
class
teacher