State of ProtoObject

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Tue Jan 14 08:18:08 UTC 2020


On Tuesday, 14 January 2020 at 00:14:01 UTC, Per Nordlöw wrote:
> On Tuesday, 14 January 2020 at 00:10:46 UTC, Per Nordlöw wrote:
>> What is the state of Andrei's plans on making `ProtoObject` 
>> the top-most node in D's object taxonomy?
>
> Here's the DIP:
> https://github.com/andralex/DIPs/blob/ProtoObject/DIPs/DIPxxxx.md

I still don't understand why not split Object into a set of 
interfaces like Printable, Hashable, Comparable and etc. The 
purpose of object itself is to have a common ancestor for all 
objects with a set of certain properties, and this can be easily 
fulfilled by an interface. Additional functionality is 
interpreted by a set of previously mentioned interfaces. Now 
since they are interfaces and no implementation can be there, we 
could provide user with a set of mixin templates that supply 
default behavior for implemented ones.

Those interfaces could also have pure/nothrow etc. subinterfaces 
that an object could implement.

Best regards,
Alexandru.


More information about the Digitalmars-d mailing list