Dynamic arrays in D 1.0

Saaa empty at needmail.com
Sun May 11 21:11:35 PDT 2008


>> Which buzz-word would that be?
>
> "const", "invariant", "pure", take your pick.

It sounded like you meant buzz-word to cover a broader audience than this 
newsgroup.
I didn't know those where buzz-words in that sense, I just thought they were 
keywords in the whole const-discussion on this newsgroup.

>>
>> I find your remark/analogy off-topic.
>
> The topic is "dynamic arrays in Dv1". I replied to a post suggesting that 
> the
> support for dynamic arrays in Dv1 was missing some fundamental features. I
> concur.
>
> Analogies are, by their nature "off-topic". They seek to clarify a point 
> by
> reference to something more easiily understood.
By this definition I can't agree that analogies are by nature off-topic, but 
going further into this would certainly yield that way and would end in a 
good old fashioned dictionary fight ;)

>
>>
>> Walter clearly states that Phobos is demand driven.
>> Also, his floating point analogy is right on mark.
>>
>
> You like Walter's analogy. Okay.
>
> Not all flosting point operations have to be built-in to the compiler. But 
> if
> you had to resort to bit-twiddling the IEEE format in order to  do
> exponentiation, you might wonder at the competeness., Or if summing an 
> bunch of
> reals caused a new 10-bytes to be allocated to accomodate each 
> intermediary
> subtotal, you might be a little taken aback.
>
> Dynamic arrays are superior to fixed sized arrays, not just because you 
> don't
> have to know their size at compile time, but because they grow and shrink 
> to
> accomodate the demands the algorithm places upon them. Insert and delete 
> are
> about as fundamental to strings and exponentiation is to reals.
>
I won't go into the being superior part, but why hasn't anybody asked about 
delete and inserts before? (not rhetorical)
I think slicing and concatenation are fundamental in D.





More information about the Digitalmars-d mailing list