Deutsch English Français Italiano |
<vc06o4$l86t$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.lang.c Subject: Re: Other programming languages (Was: Command line globber/tokenizer library for C?) Date: Fri, 13 Sep 2024 04:06:58 +0200 Organization: A noiseless patient Spider Lines: 30 Message-ID: <vc06o4$l86t$1@dont-email.me> References: <lkbjchFebk9U1@mid.individual.net> <vbumi6$8ipp$1@dont-email.me> <vbupqe$1t2d8$1@news.xmission.com> <vbus74$9k96$3@raubtier-asyl.eternal-september.org> <vbusji$1t31q$2@news.xmission.com> <vbut08$9rul$1@raubtier-asyl.eternal-september.org> <vbv212$altk$1@dont-email.me> <vbvq59$esm6$10@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 13 Sep 2024 04:07:00 +0200 (CEST) Injection-Info: dont-email.me; posting-host="3ea0b24cb964025b15904d5f352be98d"; logging-data="696541"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/LwVpg7dRcXFItqWC27RK" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:1LQMHUGQ7QsanxUJpAKmWOvLkpk= In-Reply-To: <vbvq59$esm6$10@dont-email.me> X-Enigmail-Draft-Status: N1110 Bytes: 2773 On 13.09.2024 00:32, Lawrence D'Oliveiro 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. There's different semantics with and without a 'virtual' specification. Even if you want polymorphism (and have to use 'virtual') there's no need to define it as _default_ (and "disable" it where unnecessary). A language designer is free to have it explicitly specified for that. Given that C++ has its paragon in Simula it's not surprising that it has been defined in a similar way; to explicitly declare it virtual. (Other OO languages may have that differently designed. But I won't engage in any "real" OO languages have 'virtual' defined as default sort of discussions. - It is fine for me as it is in Simula or C++. If you want to program in OO paradigm just specify 'virtual'.[*]) Janis [*] Note: The Simula compiler I use nowadays is Cim. And Cim has a serious bug where specifying 'virtual' does not work as specified; it's actually ineffective. I discovered an alternative non-standard syntax specification that makes polymorphism work in Cim. (Search the Web/Usenet or just ask or mail me if interested in the details.)