[fpc-pascal] List of integers? Any class available in RTL or FCL to help?

Sven Barth pascaldragon at googlemail.com
Mon Dec 5 11:34:46 CET 2016


Am 05.12.2016 11:01 schrieb "Lars" <noreply at z505.com>:
> With data structures like this it does seem people are reinventing it,
> especially when people use a TStringList to store integers (I have done
> this before, a shame indeed, bad programming practice)... Or complex
> generics which just seems like over engineering, but at least it works.
> Using plain old arrays, requires reinventing the wheel because you end up
> writing duplicate functions for each array type (array of string) instead
> of a general purpose algorithm for many types..
>
> I guess that is why some people prefer dynamic typed languages because you
> can write general algorithms for many types without reinventing the wheel.
> But with static languages it is still possible, as GoLang has a
> associative array, maps, etc without resorting to complex generics.

I really don't get why some people think of generics as complex -.-

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20161205/ade47dec/attachment.html>


More information about the fpc-pascal mailing list