logoalt Hacker News

pjmlptoday at 5:03 PM1 replyview on HN

Just like any C function without looking into the translation unit, don't say you blindly believe on the function name.


Replies

leleletoday at 7:10 PM

Not really. C++ is on another level altogether: the code could be calling implicit conversion operators, the compiler could have instantiated some template code in an unforeseen way, and so on.

Years ago, I was really proficient in C++, but after a year of programming in C#, I realized that not once had the behavior of my code caught me off guard. In the following years, I only ran into quirky behavior a couple of times. I could finally program without the constant mental overhead of watching out for C++ pitfalls.

show 1 reply