News for hackers. Stuff that matters.
Re:My Thoughts on “Bad Code” by frbaug on Friday March 17, 2023 @01:20PM (#35200036)
My biggest pet peeves in the code I'm currently working. It leads to multiple multi-line ternary to keep a single return.

Single Return made sense when we had to de-allocate resources, but there are few years already that most languages have memory safe resource-counted allocations (C++11 for i.e) that will free resources correctly independent of your single/multiple returns.

I don't believe that keeping those inherited "best practices" from the past will help us developing modern code.

Long life to Clean Coding!

There are no comments on this comment yet.