3 ms·
Did that when I was younger, but with my own code :) There was an if that didn't need brackets when I wrote it. 6 months later it needed more stuff on a branch
by nottorp 2y ago
Did that when I was younger, but with my own code :)
There was an if that didn't need brackets when I wrote it. 6 months later it needed more stuff on a branch but i was tired and in a hurry so I didn't notice adding extra lines needs brackets. New code compiled but wasn't part of the if. Turned a 5 minute fix into 2 days.
Of course, all my ifs have had brackets on both sides since then.
- ordu 2y agoIt is the thing I love about emacs, it autoindents everything, so if you got brackets/braces/parenthesis wrong you see something you don't expect. But obligatory braces work too.
- nottorp 2y agoYeah maybe these days the smarter autoindent would prevent incidents like this. But it's too late for me, I'll add braces around 1 line branches till i die :) Well, not in python...