[fpc-pascal] TypeInfo question
ryan at thealchemistguild.com
Thu Mar 23 15:57:48 CET 2017
I have some generics which operate on multiple types and instead of making subclasses for certain types and overriding methods I wonder if using the RTTI like:
PTypeInfo(TypeInfo(T))^.kind = tkClass
would be a good idea. How is TypeInfo() implemented exactly? I’m curious if there are any string comparing, allocating memory etc... that would adversely affect performance since these classes need to perform fast data lookups/insertions.
More information about the fpc-pascal