Dynamic arrays in D 1.0

Me Here p9e883002 at sneakemail.com
Sun May 11 20:29:27 PDT 2008


Saaa wrote:

> Which buzz-word would that be?

"const", "invariant", "pure", take your pick.
> 
> 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.

> 
> 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.

b.
-- 




More information about the Digitalmars-d mailing list