News for hackers. Stuff that matters.
Re:Modern C++ gamedev: thoughts and misconceptions by eska on Saturday May 16, 2020 @08:41AM (#23202920)
I just fixed a segfault the other day because one of our new hires fresh from college is eager on using modern c++ and didn't put parentheses at the correct place in his fold expression.
Re:Modern C++ gamedev: thoughts and misconceptions by HelloNurse on Sunday May 17, 2020 @05:35AM (#23210830)
It sounds like an interesting bug, can you elaborate? On the surface it sounds like your new hire merely used fold expressions to call functions and operators that were already treacherous on their own.
Re:Modern C++ gamedev: thoughts and misconceptions by eska on Monday May 18, 2020 @07:33AM (#23221069)
Sorry, I can't look it up right now, but trying to reconstruct it in my head it must've been something like

    y = (f(x1), f(x2), f(x3))
vs

    y = f(x1, x2, x3)
Not entirely sure anymore though. But it was something about causing side effects but throwing away return values with the ,-operator and involved function calls, I think