Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You should always know the signature of a function you're calling. Please be reading docs.

The part I agree with are the method selection semantics. A good rule of thumb (though don't rely on it) is that the "more specific" prototype generally wins.



I agree you should know what you are calling when writing code, but there is also a need for people to read the code and understand what the behavior will be. My impression is that C++ relies a lot on implicit knowledge.


All languages do.


Well, many languages try to keep this minimal. C++ doesn't.


And it's nothing new with move/copy semantics either. Even passing by reference is bad for hiding that. Every time I write C++ I'm tempted to take pointers as parameters in places where you'd normally take a reference just so the call site has an indication of what I'm doing.


Totally agree.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: