Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c++
Subject: Re: ???Microsoft Azure CTO Mark Russinovich: C/C++ should be deprecated???
Date: Fri, 07 Oct 2022 16:00:47 -0700
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <86lepri6hs.fsf@linuxsc.com>
References: <871qs3za1l.fsf@bsb.me.uk> <87pmfnxlt0.fsf@bsb.me.uk> <868rlyj8xd.fsf@linuxsc.com> <7e3900e7-358f-440b-9afe-57d42b095a03n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader01.eternal-september.org; posting-host="e9af8a14b3afeb4602ce0a4d6fb9cd53"; logging-data="4104800"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zvxoyvK4PRXtc1ncFwqwqys9S6UjqaLE="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:nWjLmEp9KL7EuM7/VY+0fhHWdKA= sha1:COj7P+nkvs1I+V2oEeXgJnEGMqc=
Xref: csiph.com comp.lang.c++:86833
Michael S writes:
> On Sunday, October 2, 2022 at 10:57:21 PM UTC+3, Tim Rentsch wrote:
>
>> Michael S writes:
>>
>>> On Friday, September 23, 2022 at 1:02:17 PM UTC+3, Juha Nieminen wrote:
>>>
>>>> As another example: "convert(...)" might feel more convenient to
>>>> write than something like "convert_to_utf8_from_utf16(...)", but
>>>> you have to think about the code from the perspective of someone
>>>> who is reading it and doesn't already know what it's doing.
>>>> The latter may be significantly longer but it expresses infinitely
>>>> more clearly what it's doing (even without seeing what the parameters
>>>> are). Someone seeing just "convert(...)" in the code can't have any
>>>> idea what it's doing.
>>>
>>> It sounds like an argument against C++-style static polymorphism.
>>
>> Do you mean ad hoc polymorphism, aka function overloading? Or do
>> you mean something else, e.g., template-related?
>
> Mostly the former, but I'd rather do without the later as well.
> With very few exceptions.
> The only static polymorphism I wholeheartedly approve is
> polymorphism of arithmetic operators for built-in types.
Not that I disagree necessarily, but can you say what it is about
function overloading you don't like? (For the time being let's
ignore the larger topic of polymorphism with templates.)