On 10/15/2010 11:31 AM, Pete Becker wrote:
> On 2010-10-14 16:02:04 -0400, Victor Bazarov said:
>
>> On 10/14/2010 3:48 PM, Niklas Holsti wrote:
>>>
>>> Since this thread has already mentioned Ada as an example of a language
>>> where this kind of non-hiding can happen, perhaps it is apropos to
>>> explain what would happen in Ada for this example:
>>>
>>> Adding the function Base::f would make the call d.f(3) ambiguous, since
>>> the compiler could not decide if the literal "3" should be taken as
>>> integer or long-integer. Thus the compilation would fail, and the
>>> programmer would have to say explicitly which type should be used for
>>> "3", and this would determine if the call is to Base::f or to
>>> Derived::f.
>>>
>>> So this example would "work" (be safe) in Ada because Ada does not have
>>> the wide range of automatic type conversions and the "best match"
>>> ambiguity resolver that C++ uses.
>>>
>>> (I'm a habitual Ada programmer who is now trying to learn more about
>>> C++. From my perspective, the automatic type conversions in C++ are
>>> rather hair-raising 
>>
>> This is all a matter of personal preference, I would guess. Thirty
>> percent of countries in the world have cars normally moving on the
>> left side of the road. I find that rather hair-raising, and they do it
>> every day without even blinking.
>>
>> Let's not submerge ourselves in feature bashing or language
>> comparison, shall we? Never does anything good come out of any of
>> those "discussions" here or in any other place.
>>
>
> Victor, chill out! That sure looked to me like a neutral comparison of
> how two languages address this issue, and it was quite helpful to me.
>
I'll chill out when I think it's time to chill out, thank you. My
suggestion was directed at the "automatic type conversions in C++" note
and *not* at the comparison of function overloading/hiding in C++ and
Ada (which was what you found helpful, I suppose). We've seen some
lunatics jumping on any chance to start complaining about different
aspects of C++, warranted or not, and all those characters need is a
whiff of a "don't get me started on <blah>" to actually start the
bashing. Just trying to avoid wasting the bandwidth.
V
--
I do not respond to top-posted replies, please don't ask