SerpentOS departs from Dlang
ryuukk_
ryuukk.dev at gmail.com
Sun Sep 17 15:34:49 UTC 2023
On Sunday, 17 September 2023 at 00:55:22 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> On 17/09/2023 11:46 AM, Adam Wilson wrote:
>> Kidding aside. If you do this, you might as well turn them on
>> everywhere. After that it's a easy stroll to a non-blocking
>> moving GC, which would end most complaints about the GC
>> (nobody complains about the .NET GC anymore).
>
> The scope of each doesn't match up, and you'd still need the RC
> specific write barriers.
>
> So when I say write barrier what I mean is:
>
> ```d
> class MyRoot : void {
> void opRCWriteBarrier(size_t fieldOffset, void* pointer) {
> myCyclicDetector.set(cast(void*)this, fieldOffset, pointer);
> }
>
> void opRCSub() {
> if (atomicOp!"-="(this.refCount, 1) > 0)
> myCyclicDetector.collect(cast(void*)this);
> }
> }
>
> class Child : MyRoot {
> Array!int array;
>
> void func() {
> array = new Array!int();
> // this.opRCWriteBarrier(array.offsetof, cast(void*)array);
> }
> }
> ```
>
> Only needs to support classes + structs (I think), so its
> surface area is pretty small.
>
> Oh and Walter has approved anyone to experiment with write
> barriers ages ago, although nobody has.
I hope we'll see tagged union + tuple come first before that mess
you are describing, because to me this sound like a giant waste
of effort, time and opportunity
You'll never attract more people if you focus on OOP / GC, that
kind of code is repulsive to be honest
Tagged Union alone will help build libraries that doesn't require
that OOP crap and help reduce the need of a GC significantly,
more structs, less class, more values less heap allocated garbage
for a collector to stop the world
D has ton of features that help avoid GC completely, let's focus
on more of that
Atila, didn't you say "allocator good", so where are they?
leadership is also frozen?
More information about the Digitalmars-d-announce
mailing list