[Off-Topic] John Carmack's point of view on GC and languages like JavaScript
jmh530
john.michael.hall at gmail.com
Mon Aug 8 15:39:16 UTC 2022
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.
More information about the Digitalmars-d
mailing list