[Off-Topic] John Carmack's point of view on GC and languages like JavaScript

IGotD- nise at nise.com
Mon Aug 8 17:01:23 UTC 2022


On Monday, 8 August 2022 at 15:39:16 UTC, jmh530 wrote:
>
> 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.

Yes, as always there is a trade off. In almost no cases will 
functions take raw pointers, just like C# that has raw ponters 
you almost never use them other than in special cases.

Problems start to arise when when programs and shared libraries 
are compiled with different GCs. One thing I have personally 
noticed, having a pointer to the free function in the managed 
pointer type makes it very versatile. Even change GC in runtime 
becomes possible.

With managed pointers only, the world will open up for us to 
experiment with things like this.


More information about the Digitalmars-d mailing list