March 23, 2010, 10:17 am
This morning on StackOverflow, someone asked a question about invoking constructors through extended RTTI. It happened that I’d had to work out a way to do that a couple weeks ago, and it took me about 5 minutes to find the code, strip out a few specific details and type up a solution. I got an accepted response, a few upvotes, and a very interesting comment from the author:
Continue reading ‘Closing the documentation gap’ »
March 15, 2010, 4:07 pm
Delphi 2010’s help describes TValue, used by the RTTI unit to store values of arbitrary types, as “a lightweight version of the Variant type.” I saw that and it made me wonder, how lightweight is it? How fast is using TValue?
Thankfully, among D2010’s lesser-known new features is the Diagnostics unit, which gives us TStopwatch, a simple record for timing operations. That makes it very easy to write a simple speed test.
Continue reading ‘TValue is very slow!’ »
October 16, 2009, 12:22 am
I woke up this morning and checked DelphiFeeds, and found a very interesting post by Jolyon Smith about the use of the absolute keyword. That reminded me that I had to go and write up this article. Why? Because it’s the only way I know of to get inside an anonymous method’s functor object and do some looking around.
Continue reading ‘Under the hood of an anonymous method’ »