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