#dbugfix 17592

Jonathan M Davis newsgroup.d at jmdavisprog.com
Fri Mar 23 21:55:52 UTC 2018


On Friday, March 23, 2018 21:45:14 12345swordy via Digitalmars-d wrote:
> On Friday, 23 March 2018 at 18:40:45 UTC, jmh530 wrote:
> > On Thursday, 22 March 2018 at 21:37:40 UTC, Basile B. wrote:
> >> [snip]
> >>
> >> I don't say that's the solution. I think there's no solution.
> >
> > I'm not sure there's no solution, but there's definitely no
> > EASY solution. And when I say solution, I don't mean a
> > resolution of this specific issue. I mean to resolve the
> > fundamental issue, which is being able to clean up memory in
> > betterC or @nogc.
>
> Can we create new type of classes that combines system attributes
> with classes?
> Creating new keywords like nogcclass, safeclass by doing this.
> Which, take nogcclass for example, automatically adds @nogc
> attribute to every function including .objects functions, which
> can not be removed. That way we avoid breaking backwards
> compatibility with the usage of default class by introducing new
> strict subset of classes.
>
> I am thinking writing a dip that goes into detail.

Walter and Andrei have been discussing putting together a DIP with a
"ProtoObject" which will be the new root class below Object where
ProtoObject itself has only the bare minimum required to work as a class
(not monitor object, no toString, no opEquals, etc.). Classes could then
derive from ProtoObject directly instead of from Object, and then they could
define any of the functions that are currently on Object with whatever
attributes they wanted (or not define them at all). The DIP has not yet been
written, and the details still need to be ironed out, but that's the gist of
the direction that's currently being considered.

- Jonathan M Davis



More information about the Digitalmars-d mailing list