[fpc-pascal] dynamic array contents and system.move
JeLlyFish.software at gmx.net
Tue May 4 21:11:44 CEST 2010
> I fear you've simply no clue about the usage,
> internals and purpose of dyn. arrays so I stop this discussion.
As you always do once someone does not share your point of view, even after you tried so hard to convince him. :P Well, never mind.
Still, dynamic arrays are a bitch, because they only *pretend* to be arrays up to a certain point. Comparing this data type with classes, or even file type (thus, records) is pointless, because those types do not have a counterpart like the dynamic array has in the form of the "static" array.
A class is a class - is a pointer^Wreference type. Always. Ever. In every context. In contrast, an array is an array is - yes, either an array or a pointer. Maybe.
Is it really that hard to admit to the fact, that the design of dynamic arrays makes promises which the abstraction can't keep, rather than neglecting this fact each and every time this discussion comes up?
Yes, of course, a dynamic array is a precise data type you should know how to handle. This would be the end of discussion if it were the only array-like data type. Unfortunately, the point of reference is the old style static array which the dynamic counter-part tries to resemble - and fails to do so.
The dynamic array simply fails the principle of least surprise. No more, no less.
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
More information about the fpc-pascal