Top 5
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Oct 10 06:22:10 PDT 2008
Sergey Gromov wrote:
> My T[] is useful when you want to recursively split a megabyte file into
> a couple thousands of tokens, and then modify some of those tokens. For
> that, your T[] must be lightweight, it must reference a bigger piece of
> data, and it must guarantee not to write anything into memory outside
> its boundaries.
>
> The Array is for appending. It must always own its memory. Therefore
> you should be able to pass it around by reference, so Array is a *class*
> and cannot be nearly as lightweight as T[].
>
> You see, many of their properties are orthogonal. If you drop one, you
> lose flexibility.
>
>> Besides, Array!(T) is not a good name for build-in type.
>
> Names are placeholders here, not an actual proposal.
What's wrong with making Array a library type?
Andrei
More information about the Digitalmars-d
mailing list