Worst ideas/features in programming languages?

Araq rumpf_a at web.de
Fri Oct 15 16:05:13 UTC 2021


On Friday, 15 October 2021 at 15:42:13 UTC, IGotD- wrote:
> On Friday, 15 October 2021 at 14:24:16 UTC, SomeGuy wrote:
>> [...]
>
> The biggest obstacle is that D has no fat pointers. It has only 
> pointers which is enough when you have tracing GC but not 
> enough if your pointers requires extra metadata.
>
> This is one of the biggest mistakes in D which limits the 
> possibility to change GC type. Other languages like Nim have a 
> reference types which is a fat pointer type. Nim has gone 
> through more GC types in a shorter time than D.
>
> Fat pointers come at a cost though which might be extra 
> dereferences as your data is an inner pointer member. In 
> practice this is already possible in D as a library solution. 
> Problem is that you cannot easily change Druntime/Phobos to 
> also use your custom GC.

Er, that's not how Nim's "fat pointers" work and the term is 
either misleading or wrong, sizeof(ref) == sizeof(void*) in Nim 
land.


More information about the Digitalmars-d mailing list