April 21

On Wednesday, 21 April 2021 at 01:00:59 UTC, TheGag96 wrote:

>

On Tuesday, 20 April 2021 at 16:28:46 UTC, russhy wrote:

>

We need to transition to RC instead of GC, the sooner, the better

Maybe I'm wrong, but wouldn't we be just going from one form of memory management people find slow to another? And a kind we know is particularly slow (even if more predictable)? It seems to me that the really anti-GC crowd (or the portion of it that I know of - the Handmade / game dev group) doesn't want GC nor RC, but instead something way more C-like, with custom allocators and such. I think that's what languages like Zig that sprang up out of nowhere are suddenly taking off and why there's still anticipation for Jai nearly 7 years later.

I do kind of agree that maybe a D3 is what's needed in order to have a clean rethinking and uncrufting of the language. I've been feeling that despite D's amazing features and upsides, something just isn't clicking with people. Since I became an avid D fan many years ago, most programmers I talk to have never heard of it, and the situation has not gotten better over time.

I mixed things with the Swift analogy i used earlier my bad, i meant the IAllocator driven APIs, need to allocate? one want GC in their program? fine provide the GCAllocator, but don't enforce it to everyone

And i agree with you, that is the perfect opportunity for a D3 vision, and that's where the sooner the better make sense, because just like you said, there is a need for a modern C alternative

>

I've been feeling that despite D's amazing features and upsides, something just isn't clicking with people.

The experience i have with this was always the GC

April 21

On Wednesday, 21 April 2021 at 00:47:13 UTC, russhy wrote:

>

C is not displaced because of that, it doesn't tell you what to do, and how to do, it gives you the tools so you can write portable code, efficient and better software

ISO C is being replaced with ISO C++, that trend won't stop.

Walter does not want to have many pointer types, that makes a library based allocator strategy a mess.

My proposal is simpler, if you don't want GC, don't use a GC-Task.

April 21

On Tuesday, 20 April 2021 at 16:45:38 UTC, russhy wrote:

>

C++ could have went with a GC, they decided to go against and encourage the use of smart pointers

That was smart, actually

Kind of, there are C++/CLI, C++/CX, C++ Builder and what many keep forgeting when talking about game developers and tracing GC, Unreal C++.

Also in regards to Objective-C and Swift, Objective-C did went with a tracing GC, the pivot into RC as compiler assisted help for Cocoa retain/release patterns, only happend due to C's memory model borking the whole idea.

https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/GarbageCollection/Introduction.html

Swift naturally needed to use the same model, otherwise a translation layer like .NET RCW for COM would be needed had they gone with tracing GC.

April 21

On Wednesday, 21 April 2021 at 06:37:21 UTC, Paulo Pinto wrote:

>

On Tuesday, 20 April 2021 at 16:45:38 UTC, russhy wrote:

>

C++ could have went with a GC, they decided to go against and encourage the use of smart pointers

That was smart, actually

Kind of, there are C++/CLI, C++/CX, C++ Builder and what many keep forgeting when talking about game developers and tracing GC, Unreal C++.

Yes, but C++ has had the Boehm collector since the early 90s, which is comparable to D's current default collector. There is also C++11 N2670 ("Garbage Collection and Reachability-Based Leak Detection") that has no compiler support, but actually is in the language.

Garbage collection simply isn't widespread in C++ as the main allocation strategy, but it is in D. The demographics are different.

April 21

On Wednesday, 21 April 2021 at 08:09:17 UTC, Ola Fosheim Grøstad wrote:

>

On Wednesday, 21 April 2021 at 06:37:21 UTC, Paulo Pinto wrote:

>

On Tuesday, 20 April 2021 at 16:45:38 UTC, russhy wrote:

>

C++ could have went with a GC, they decided to go against and encourage the use of smart pointers

That was smart, actually

Kind of, there are C++/CLI, C++/CX, C++ Builder and what many keep forgeting when talking about game developers and tracing GC, Unreal C++.

Yes, but C++ has had the Boehm collector since the early 90s, which is comparable to D's current default collector. There is also C++11 N2670 ("Garbage Collection and Reachability-Based Leak Detection") that has no compiler support, but actually is in the language.

Garbage collection simply isn't widespread in C++ as the main allocation strategy, but it is in D. The demographics are different.

None of the examples I gave use the pre-historic Boehm collector.

Also no one cares about C++11 N2670, because the above mentioned examples already had their own solutions, and aren't going to rewrite them, because it was a compromise not capable to do what those dialects were already offering, so much that C++11 N2670 is voted for removal in ISO C++23.

April 21

On Wednesday, 21 April 2021 at 09:23:06 UTC, Paulo Pinto wrote:

>

None of the examples I gave use the pre-historic Boehm collector.

That doesn't change the fact that D's current default collector is comparable to Boehm.

I don't know anything about C++/CX, but wikipedia says:

«A WinRT object is reference counted and thus handles similarly to ordinary C++ objects enclosed in shared_ptrs. An object will be deleted when there are no remaining references that lead to it.

There is no garbage collection involved.»

https://en.wikipedia.org/wiki/C%2B%2B/CX

April 21

On Wednesday, 21 April 2021 at 09:47:32 UTC, Ola Fosheim Grøstad wrote:

>

On Wednesday, 21 April 2021 at 09:23:06 UTC, Paulo Pinto wrote:

>

None of the examples I gave use the pre-historic Boehm collector.

That doesn't change the fact that D's current default collector is comparable to Boehm.

I don't know anything about C++/CX, but wikipedia says:

«A WinRT object is reference counted and thus handles similarly to ordinary C++ objects enclosed in shared_ptrs. An object will be deleted when there are no remaining references that lead to it.

There is no garbage collection involved.»

https://en.wikipedia.org/wiki/C%2B%2B/CX

Reference counting is GC.

April 21

On Wednesday, 21 April 2021 at 09:50:53 UTC, Paulo Pinto wrote:

>

Reference counting is GC.

Not in the context of this thread.

April 21
>

Kind of, there are C++/CLI, C++/CX, C++ Builder and what many keep forgeting when talking about game developers and tracing GC, Unreal C++.

It is so good that unreal developers are all working around the GC ;)

Just like the unity peeps, everyone workaround the GC with ugly hacks and ugly code

April 21

On Wednesday, 21 April 2021 at 11:14:39 UTC, russhy wrote:

> >

Kind of, there are C++/CLI, C++/CX, C++ Builder and what many keep forgeting when talking about game developers and tracing GC, Unreal C++.

It is so good that unreal developers are all working around the GC ;)

Just like the unity peeps, everyone workaround the GC with ugly hacks and ugly code

I bet D wouldn't mind to have 1% of the market share they enjoy across the games industry, AR/VR devices and independt movie industry, including not so successful movies like Mandalorian.

But that is just me.

1 2 3 4 5 6 7 8 9 10