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: Z++ for Windows and Linux Date: Thu, 02 Feb 2023 07:09:50 -0800 Organization: A noiseless patient Spider Lines: 47 Message-ID: <86357odry9.fsf@linuxsc.com> References: <71b98e95-046c-4de5-8d6a-b7f5b8364d23n@googlegroups.com> <87a61ywdhw.fsf@nosuchdomain.example.com> <74258a32-da0a-4dbe-afef-f77f6c0b04bcn@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader01.eternal-september.org; posting-host="cd6b68a0a75b913a4435862c053909f6"; logging-data="996439"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184A+WjqwqB90SSwsNhlx4uU4O8mxb3LZk=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:jSpunh9bAQQ8UpAWey5xQulZ5Hs= sha1:nfmJaeJub+N2SzY/W8NOKHuUMOk= Xref: csiph.com comp.lang.c++:88958 scott@slp53.sl.home (Scott Lurndal) writes: > Zorro writes: > >> On Tuesday, January 31, 2023 at 6:30:21 PM UTC-6, Scott Lurndal wrote: >> >>> Zorro writes: >>> >>>> On Tuesday, January 31, 2023 at 4:29:42 PM UTC-6, Chris Thomasson wrote: >>>> >>>>> On 1/31/2023 2:22 PM, Keith Thompson wrote: >>>>> >>>>>> "Chris M. Thomasson" writes: >>>> >>>> Having said all of that, Z++ is for building platform-independent, >>>> "distributed" software. It is NOT to replace >>>> C++ for making system software such as an IDE, just as C++ is NOT for >>>> writing operating systems. That is the >>>> job of C. >>> >>> Having written two commercial operating systems in C++ and two >>> bare-metal hypervisors in C++, I would dispute that assertion most >>> vociferously. >>> >>> Using carefully chosen subsets of the C++ language is perfectly >>> acceptable and generates code that compares favorably with C and >>> allows the encapsulation of data and methods in class structures. >> >> Every C++ class/struct will have to include a so-called virtual >> table. > > No, that is not the case. The virtual table is only present when > function overloads exist and in certain multiple inheritance > scenarios. [...] This claim isn't right. Any class (or struct) that has at least one virtual function will have a virtual function table. The existence of a virtual function table does not depend on whether the class/struct has overloaded functions or whether inheritance is present. Note that these comments apply to class/struct definitions, not to instances thereof. Each instance of a class or struct that has virtual functions will have a pointer to the appropriate virtual function table (with the understanding that such pointers may be shared when inheritance is present, and may have more complicated relationships when multiple inheritance is used).