The Varying (and Variant) Value of True

[Estimated Reading Time: < 1 minutes] My most recent posts have prompted a bit of discussion, and it seems some concern, regarding the implementation of Boolean values in Delphi. The concern at least I think is unwarranted, as long as you avoid explicitly comparing a Boolean value to the True constant and allow the compiler to logically evaluate the Boolean itself. But in the follow up investigations of one commenter (thank you Arthur), a further occurrence of the alternate -1 identity of True has been identified: Variants.

Anonymous Classes: Identity Exposed!

[Estimated Reading Time: 2 minutes] In my previous post on Anonymous Classes I erroneously referred to them as “dynamic objects” (thanks to commentors for pulling me up on that). Dynamic objects are something else entirely (although what precisely they might mean can vary on different platforms and in different languages). I have now corrected that post on this point, and also on another point that Marc Hoffman called me out on (again, thanks for that). And so the time has now come to expose the true identity of these so called “Anonymous Classes”.

Anonymous Classes: Implementing Interfaces

[Estimated Reading Time: 4 minutes] A few years ago (2011 to be precise) someone asked a question on StackOverflow about support for anonymous classes in Delphi. The reason for the question was that the poster was trying to use Delphi to develop for Android and on that platform the widespread use of callback interfaces makes anonymous classes highly desirable.

Formatting Case Statements

[Estimated Reading Time: 3 minutes] I’m afraid I have been guilty of editorialising on StackOverflow. It was sheer laziness really. A question prompted me to respond by sharing a personal preference and instead of “context switching” to my blog I posted an answer that even at the time I acknowledged was not in fact an answer (though as transgression go I have to say I have seen far worse, but, that’s no excuse). So, with (further) apologies to StackOverflow, I have withdrawn that answer and instead present that editorial here, a more appropriate forum.