Improvement to struct inheritance possible?

zjh fqbqrr at 163.com
Thu Jan 18 07:32:56 UTC 2024


On Thursday, 18 January 2024 at 07:28:22 UTC, zjh wrote:

> Why can't struct be inherited ?C++ has good `struct 
> inheritance`, and it's there.
> The disadvantage of `C++ inheritance` is that every `subclass` 
> with a template now needs to add its `own name` and ugly `::`, 
> which is becoming increasingly unsightly! This is `very 
> foolish`,


I look forward to `someone` writing a `compiler plugin` that can 
compensate for `these shortcomings`. If the compiler allows 
`various plugins`, it would be very good.

Plugins are completely selectable by users, which is equivalent 
to placing all the `switches` of `'dmd'` in a separate `plugins 
directory` .



More information about the Digitalmars-d mailing list