c++ - Why is the return value of the function not part of the symbol name -


the return type not part of symbol name. makes overloading of function based on return type impossible. idea behind approach?

the reason given bjarne stroustrup part of post in newsgroup comp.lang.c++, dated 12 january 1998 is

the reason c++ doesn't allow overload resolution based on return type (so need use explicit qualification in examples below) wanted overload resolution bottom up. example, can determine meaning of subexpression a+b without considering complete expression a+b part of. overload resolution can subtle though knew how use return types part of resolution (ada showed how), decided not to. result of decision, a+b means same in a+b+c in a+b+d.

agree or not, rationale behind design decision.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -