Discussion Thread: DIP 1042--ProtoObject--Community Review Round 1

RazvanN razvan.nitu1305 at gmail.com
Tue Jan 11 12:52:42 UTC 2022

On Tuesday, 11 January 2022 at 06:25:34 UTC, Rumbu wrote:
> On Monday, 10 January 2022 at 18:09:21 UTC, russhy wrote:
>> Does the language not have enough to avoid OOP? let's solve 
>> that first!
> Here we talk about "Object" which - I fail to understand the 
> surprise - it is about OOP.
> More than that, since it is a tight dependency between objects 
> and the garbage collector, what improvement will render a @nogc 
> thrown here and there? Currently there is little support în the 
> language for using objects outside gc, I really don't 
> understand why limit the overrides to patterns that will be 
> difficult to satisfy. In my opinion the only qualifier that 
> must be put to these basic functions is @safe. Hashing can be a 
> costly operation (think at files or streams), const will 
> prevent any caching. Comparing strings for example can discover 
> invalid unicode characters, why nothrow? Comparing timestamps 
> may need reading the current time zone, why pure?

But we are not imposing anything by switching to ProtoObject.
ProtoObject is an empty class that gives you the ability to
implement **whatever** you want. The utility functions that
we are providing are optional. If they don't cut it for your
special case you can just implement whatever interface you want.

More information about the Digitalmars-d mailing list