August 12, 2022
On Thursday, 11 August 2022 at 20:55:23 UTC, IGotD- wrote:
> On Thursday, 11 August 2022 at 13:20:13 UTC, wjoe wrote:
>> [...]
>
> Yes, real time code today will avoid GC all together. Likely it will use custom everything, like specialized allocators, caches and container algorithms. All in order to avoid memory allocation from a heap as well as avoiding memory fragmentation.
>
> Many times real time systems has a real time part but also a non real time part which often runs a rich OS like Linux. Services in the rich OS part can usually use GC without any problems.
>
> In terms of computer games, correct me if I'm wrong but GC will become the norm there. The reason is that computer games are becoming more and more advanced and there is so much stuff going on that GC becomes a lesser problem compared to everything else in terms of performance. Probably if I came to a computer game technical manager in 20 years and said I wanted to use GC, he would probably kill me. Today if I said the same, he would say it's probably ok. I'm not that convinced by the Doom example as there seem to be a confusion between caches and GC. You are welcome to come with more examples of early computer games that used GC.

Unless the game doesn't support any kind of scripting language, there will be some level of GC taking place, Blueprints, Lua, Python, GDScript,.....

And then there are the engines that expose it even to the engine layer itself, Unreal, SceneKit, Stride, MonoGame, PlayCanvas, BabylonJS....

August 14, 2022

On Monday, 8 August 2022 at 15:39:16 UTC, jmh530 wrote:

>

On Monday, 8 August 2022 at 15:07:47 UTC, IGotD- wrote:

>

[snip]

D did the serious mistake by having raw pointers in the default language (even in safe mode) rather than opaque references. This means that D cannot just as easily offer different GC algorithms like other languages.

If D would have opaque references then we would have seen more different GC types that would fit more needs.

D3 needs to happen so that we can correct these serious flaws.

It is a bit of a design trade-off though. If you have two separate pointer types, then a function that takes a pointer of one has to have an overload to get the second one working. Some kind of type erasure would be useful to prevent template bloat.

Isn't this already kinda there with T* and ref T? Let's just go even farther and call T* unmanaged and ref T managed, imo

August 14, 2022

On Sunday, 14 August 2022 at 07:29:26 UTC, Tejas wrote:

>

Isn't this already kinda there with T* and ref T? Let's just go even farther and call T* unmanaged and ref T managed, imo

I tend to mix references and managed pointer in the text, which is wrong. The reason I sometimes mention managed pointers as references is that Rust named references as their life time pointers. It should really be managed pointers or fat pointers.

References in D are similar to C++ and have nothing to do with memory management. Managed pointers in D requires an own type.

August 15, 2022
On 8/14/2022 12:29 AM, Tejas wrote:
> Isn't this already kinda there with `T*` and `ref T`? Let's just go even farther and call `T*` unmanaged and `ref T` managed, imo

`ref` pointers have an additional property that they cannot escape their scope.
1 2 3 4 5 6
Next ›   Last »