Top 5
Denis Koroskin
2korden at gmail.com
Fri Oct 10 06:43:42 PDT 2008
On Fri, 10 Oct 2008 17:22:10 +0400, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> 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
Then, you'll have to drop new T[] syntax in favor of new Array!(T);
More information about the Digitalmars-d
mailing list