Tsoding streamed about D

Ogion ogion.art at gmail.com
Tue Mar 25 13:34:10 UTC 2025


On Tuesday, 25 March 2025 at 11:19:04 UTC, Mike Shah wrote:
> Indeed, I wrote my own 'DynArray' type for use in betterC. 
> Declaration is with 'DynArray!int intArray' for example. I then 
> used overloads for opSlice and such to get pretty much the same 
> functionality (e g. auto slice = intArray[2..4]). I can also 
> wrap that with a reference counted type to help avoid leaks if 
> lifetime and scope varies :)

`std.container.array` is basically this. Except it doesn’t work 
in BetterC :^)


More information about the Digitalmars-d mailing list