How to use D without the GC ?

Lance Bachmeier no at spam.net
Wed Jun 12 22:40:09 UTC 2024


On Wednesday, 12 June 2024 at 21:59:54 UTC, drug007 wrote:

>> Yes, but you get all the benefits of `double[]` for free if 
>> you do it that way, including the more concise foo[10] syntax.
>
> I meant you do not need to add `ptr` field at all

I see. You're right. I thought it would be easier for someone new 
to the language to read more explicit code rather than assuming 
knowledge about data.ptr. In practice it's better to not have a 
ptr field.


More information about the Digitalmars-d-learn mailing list