Zorro <
zor...@gmail.com> writes:
>On Tuesday, January 31, 2023 at 6:30:21 PM UTC-6, Scott Lurndal wrote:
>> Zorro <
zor...@gmail.com> writes:
>> >On Tuesday, January 31, 2023 at 4:29:42 PM UTC-6, Chris M. Thomasson wrote:
>> >> On 1/31/2023 2:22 PM, Keith Thompson wrote:
>> >> > "Chris M. Thomasson" <
chris.m.t...@gmail.com> 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.
In those case, the overhead is no different that using the
traditional mechanisms of indirect calls through a
vector of function pointers (e.g. for Virtual File System
dispatch tables, or Scheduler dispatch tables, etc).
> This is nothing more than the C "interrupt jump table",
Actually, it is more, since the compiler handles it automatically
rather than the programmer having to create, initialize and
maintain the jump vectors.
>I agree, and even like the idea of writing certain parts of an operating
>system with C++. But not the whole thing.
The hypervisor:
SLOC Directory SLOC-by-Language (Sorted)
21708 dsm cpp=21708
17714 domain cpp=17714
12276 transport cpp=12276
8689 vserver cpp=8689
8162 debugger cpp=8162
6540 core cpp=6078,asm=462
6456 io cpp=6456
6074 xen cpp=6074
4820 mgmt cpp=4820
4390 mm cpp=4390
1829 include ansic=1286,cpp=543
1636 util cpp=1636
1608 bios cpp=1608
1234 interp cpp=1234
976 boot asm=976
518 tools ansic=403,sh=59,python=56
469 build ansic=248,cpp=221
222 platform cpp=222
0 doc (none)
0 top_dir (none)
Totals grouped by language (dominant language first):
cpp: 101831 (96.69%)
ansic: 1937 (1.84%)
asm: 1438 (1.37%)
sh: 59 (0.06%)
python: 56 (0.05%)