paul doe wrote:Josep Roca wrote:We can do it ourselves, but because FB does not support templates, we would need to have procedures or classes for each kind of data type.
Unfortunately, yes. But depending on what paradigm one favors (OOP/Procedural) this may or may not be an issue. If (like me) you favor the OOP paradigm, you simply wrap the class with the datatype you want (the flexible way). Or, you can do some sort of crude 'templating' using macros (the efficient way).
The trouble is that arrays do support all value types (random structs) and OOP wrapper classes usually limit to reference types only.
You need generics if you want to make typesafe containers that are not by ref only.
To circumvent similar limitations, in an old job however (in the pre generics Delphi era) we had a system that parsed the source files with business objects though, and automatically generate source for various container types.
Having a language parser as a library is a really strong tool in such cases.