Sujet : Re: Other programming languages (Was: Command line globber/tokenizer library for C?)
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 13. Sep 2024, 04:38:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240912195922.243@kylheku.com>
References : 1 2 3 4 5 6 7 8
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-09-12, Lawrence D'Oliveiro <
ldo@nz.invalid> wrote:
On Thu, 12 Sep 2024 17:40:17 +0200, Janis Papanagnou wrote:
>
A lot of early C++ programs I've seen were just, umm, "enhanced" "C"
programs.
>
Given that C++ makes “virtual” optional instead of standard behaviour, I’d
say that C++ is in fact designed to be used that way.
That is half right, goofy. C++ is certainly designed to be used without
virtual functions. But it's also designed to be with virtual functions,
too. Both ways are by design!
Moreover, a VIRTUAL keyword was already present in Simula-67, which
inspired C++. Virtual functions were not added as an afterthought into a
language that was originally designed otherwise. But even if they were,
such an addition is a design change. If you design a thing to be used
one way, without envisioning another way, and then some time later hit
upon the idea for that other way and add it to the design, then both
ways are now designed in, and intended to be used.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca