Phobos 3 Discussion Notes - 02-01-2024
Martyn
martyn.developer at googlemail.com
Wed Feb 7 09:05:28 UTC 2024
On Wednesday, 7 February 2024 at 05:55:04 UTC, Paul Backus wrote:
> On Tuesday, 6 February 2024 at 14:41:27 UTC, Martyn wrote:
>>
>> ... Snip
>
> Nothing's set in stone yet, but in the proposal I'm working on,
> there is nothing stopping allocators from being available in
> BetterC.
>
>> ... Snip
>
> In my proposal, when you use a library container (like an
> array, a hash table, a binary tree, etc.), you can specify what
> type of allocator you want to use as a template parameter (as
> in, `Array!(int, GC)`). It will probably default to the GC, but
> you can just as easily use malloc, or even a custom allocator
> that you write yourself.
>
> I'm not planning to include a global default allocator.
> Built-in language features like `new`, dynamic arrays,
> associative arrays, and delegate contexts will always use the
> GC, and there will not be an option to change this.
Thank you for taking the time to respond. I understand a proposal
is working on, but your answers above sound very promising.
Thanks again.
More information about the Digitalmars-d
mailing list