I'm a programmer who likes games, and wants to make games for a living. At the same time, there are some really cool non-game things I want to work on -- especially if they use C or C++.
As neat as that one-liner is, I'm not a huge fan of it. The "correct" function is only a few lines in any language, and makes it explicitly clear what you're trying to do.
...that said, I have used it more than a few times when I just need something working correctly, and I'd be surprised if the compiler couldn't optimize it into something better.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
As neat as that one-liner is, I'm not a huge fan of it. The "correct" function is only a few lines in any language, and makes it explicitly clear what you're trying to do.
...that said, I have used it more than a few times when I just need something working correctly, and I'd be surprised if the compiler couldn't optimize it into something better.