[fpc-pascal] Generic routines for both dynamic array and other collections
Sven Barth
pascaldragon at googlemail.com
Mon Feb 22 14:10:33 CET 2021
Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am
Mo., 22. Feb. 2021, 13:07:
>
>
> > On Feb 21, 2021, at 2:59 PM, Sven Barth <pascaldragon at googlemail.com>
> wrote:
> >
> > You are supposed to use Length(X). There is no need for a "property".
> One doesn't need to objectify each and everything!
>
> Yes but programmers tend to be neurotic and obsessive. :) I think many of
> us would appreciate a matching "Count" method that is consistent with
> TList<T>.
>
There's a saying here in Germany:
"Das Leben ist kein Wunschkonzert"
"Life is not a concert of wishes"
I think that applies rather nicely here as well. Arrays are simply no
structured types, thus them having "properties" is wrong as well. If users
want expect arrays to be object oriented they should use corresponding
languages like Java or C#.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20210222/b006c1f8/attachment.htm>
More information about the fpc-pascal
mailing list