Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
in college ages ago, professor was "teaching" us overloading in C++, he goes something like this:
"so you can overload a function by changing the number of arguments, argument types, or method return type"
I dare put my hand up: "emm .. you can't overload by just changing the return type"
"you can"
"but, but.. how would the compiler know which overload I'm invoking when I call the method?"
pause..
"it depends on the type of the variable receiving the method call result"
"what if I call the method without assigning the result to a variable?"
agitated by now: "ah these are complex compiler concepts that are too complicated blah blah"
although I was unhappy, it was useful to realize no one knows everything
rant
wk73