Does D have too many features?
David Nadlinger
see at klickverbot.at
Sun Apr 29 22:07:53 PDT 2012
On Monday, 30 April 2012 at 03:16:09 UTC, H. S. Teoh wrote:
> On Sun, Apr 29, 2012 at 02:26:12PM +0200, David Nadlinger wrote:
>> […]
>> - Built-in arrays and AAs: They are convenient to use, but as
>> far as
>> I can see the single biggest GC dependency in the language.
>> Why not
>> lower array and AA literals to expression tuples (or
>> whatever) to
>> make the convenient syntax usable with custom (possibly
>> non-GC safe)
>> containers as well? A GC'd default implementation could then
>> be
>> provided in druntime, just like today's arrays and AAs.
> [...]
>
> AA's are moving into druntime. Yours truly is supposed to make
> that
> happen eventually, but lately time hasn't been on my side. :-/
This moves the _implementation_ to druntime, but there is still
realistically no way to use AA literals with my own non-GC'd
version of hash maps without shipping a custom druntime (and thus
modifying the semantics of an existing language construct). What
I'm talking about would let you do things like
MyVector!int stuff = [1, 2, 3, 4, 5];
without needing a (temporary) GC'd allocation, and thus please
the GC-hater crowd because they can still have all the syntax
candy with their own containers, even if they can't resp. don't
want to use the default GC'd constructs.
David
More information about the Digitalmars-d
mailing list