News for hackers. Stuff that matters.
Re:We need to talk about parentheses by agentultra on Monday February 12, 2024 @01:46PM (#39348671)
It's a personal preference based on how we mentally model problems. I cannot stand long procedural code. The mental gymnastics required to know what it does is too much. More than 5-6 variables in scope and I have no idea if it does what you say it does. It would take me some time to figure that out. If it is under test we can at least say it's not wrong some times.

I much prefer breaking problems down to the level where I can reason in terms of sets, algebras, and that sort of thing. It's much easier for my brain to rely on properties and the ability to substitute terms in equations than it is to reconstruct a giant state machine and execute it in my head. Much more so when we add concurrency to the mix.

At the end of the day though I don't think there's, "one true way."

Re:We need to talk about parentheses by lex-lightning on Monday February 12, 2024 @02:24PM (#39349105)
When I was a kid I would tell my parents I cleaned my room, then they’d look in the closet and see everything in a pile.
Re:We need to talk about parentheses by pimlottc on Monday February 12, 2024 @05:27PM (#39351382)
Don't let perfect be the enemy of good
Re:We need to talk about parentheses by lex-lightning on Monday February 12, 2024 @07:17PM (#39352534)
I still don’t fold clothes. I just buy stuff that doesn’t wrinkle. Work smarter not harder.
Re:We need to talk about parentheses by agentultra on Tuesday February 13, 2024 @10:50AM (#39358722)
My kid does this. We wanted to find a book. It required us to search through the mountain hidden in the closet and was very annoying. If it was organized we would have known where to find the book.