October 2009

RTTI Past and Present – Lachlan Gemmell

What’s RTTI? It’s Run-Time Type Information or the ability to discover, query, set and invoke variables and methods at runtime. It’s not something you use everyday but when you do it either saves you from hours of monotonous typing or it lets you do things in code you didn’t think were possible with Delphi. It’s one of Delphi’s hidden gems and a very valuable tool for any Delphi developer. We’ll go version by version through the features of RTTI as it’s evolved from modest uses back in the Delphi 5 days, such as avoiding lots of string constants, to the now super enhanced RTTI in Delphi 2010, which brings dynamic programming capabilities to Delphi comparable to .NET’s reflection.