Future of D

Max Haughton maxhaton at gmail.com
Tue Dec 15 11:59:46 UTC 2020


On Tuesday, 15 December 2020 at 10:33:21 UTC, Paulo Pinto wrote:
> On Tuesday, 15 December 2020 at 09:31:40 UTC, Araq wrote:
>> On Tuesday, 15 December 2020 at 09:11:26 UTC, Paulo Pinto 
>> wrote:
>>> With the irony that most prominent C++ game engines, and OS 
>>> component frameworks, do use some form of automatic memory 
>>> management.
>>
>> None of these systems confuses GC'ed with non GC'ed pointers. 
>> C++ for all its warts doesn't have this flaw.
>
> That I agree, but the problem isn't with the GC, rather the 
> implementation thereof.
>
> Probably the easiest way for D not to break (much) code would 
> be to keep all pointers as GC pointers by default, and non-GC 
> pointers would be the ones marked with @system.
>
> This isn't a novelty, and follows a design similar to other 
> system languages with GC support.

It would be more fruitful to annotate non-GC code i.e. it would 
need to be subject to ownership checking, which will require 
annotation to interact with existing D semantics (specifically 
for interprocedural analysis)


More information about the Digitalmars-d mailing list