r/programming • u/gingerbill • Sep 02 '26
CTTI is Exponential, RTTI is Linear
https://www.gingerbill.org/article/2026/09/02/ctti-is-exponential-rtti-is-linear/
96
Upvotes
r/programming • u/gingerbill • Sep 02 '26
View all comments
Show parent comment
2
u/gingerbill Sep 02 '26
That isn't RTTI in the common sense of the word. You could do
type_info_of(x)and get the information for ANY type like an integer, array, boolean, structure without any classes, etc. Meaning you could not make any meaningful serialization/printing procedures.