Am 05.12.2016 11:01 schrieb "Lars" <nore...@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
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal