A Timely Poll?

[Estimated Reading Time: < 1 minute] I’ve been thinking for some time about the direction that the Delphi variant of Pascal is heading, and have had this poll in my back pocket for a couple of weeks.聽 Just recently the topic has become rather prominent in the NGs, and I myself just logged a language change suggestion. So I thought now might be a good time to “Pop The Question”, hence this weeks poll: How should new language features be introduced to Delphi? You only get to choose one response this week. Choose wisely. 馃檪

Proposal for Automated Variables

[Estimated Reading Time: 4 minutes] Or: “Environmentally Friendly Coding – Recycle Your Keywords” Yesterday I logged a Quality Central report proposing the addition of support for “automatic variables” to the Delphi language.聽 Not only is it an excellent idea (in my humble and utterly objective opinion :)), but there is already a keyword in the language that could be co-opted for this purpose, a keyword that has been at something of a loose-end since it was deprecated (rendered obsolete even) a long, long time ago…

Free Yourself

[Estimated Reading Time: 4 minutes] Barry Kelly recently posted an example of “smart” pointers (specifically the auto-pointer variant of a smart pointer) using generics in Delphi 2009.聽 It was an interesting use of generics but the end result was something that has – in part at least – been possible for some time in Delphi even without generics – reliable cleanup of objects. This was something that a colleague of mine, Geza Sabo, pointed out, based on some code I’d previously shared with him to robustly manage the hourglass cursor in a GUI application.

This Weeks Poll

[Estimated Reading Time: < 1 minute] I’ve worked with a number of version/source control solutions over the years, and looked at or even evaluated聽 even more.聽 None has really been perfect, and very few even come close, each with their own strengths and weaknesses. But what do you use with Delphi? Recognising that people perhaps use one system at home and another in their “day job” (or even on different projects within the same organization), you can choose up to three responses for this poll.

Delphi 2009 – StringPerformance Redux

[Estimated Reading Time: 3 minutes] It looks like I may have jumped the gun with my conclusions from the previous exercise to benchmark string performance in Delphi 2009.聽 Following a useful exchange in the comments with Kryvich I corrected a small discrepancy in the tests and made some changes to the performance testing subsystem within the SmokeTest framework.聽 I then re-ran my string performance benchmarks with some significant – and more encouraging – differences in the results.

Delphi 2009 – CompilerVersion

[Estimated Reading Time: < 1 minute] Just a short post this one. Somebody else may already have mentioned this, but I only just figured it out for myself – the CompilerVersion for the Delphi 2009 compiler is not what you might expect (and is not what the documentation says it is!). Both CompilerVersion and RTLVersion have the value 20 in Delphi 2009. In Delphi 2007 these were 18.5 and 18.0 respectively.聽 Confusingly the documentation is correct for RTLVersion but incorrectly gives 18.0 as the value for CompilerVersion. Is anyone else wondering what happened to 19? Did Delphi 2008 happen after all and I just missed it?

Delphi 2009 – A Heads-Up for Low-Level Coders

[Estimated Reading Time: 8 minutes] Prompted by a conversation with some colleagues where-in we collectively speculated about the implementation details of a generic class and what impact – if any – this might have on performance vs a “traditional” polymorphic equivalent, I threw together a quick performance test case in my Smoketest framework, and as a result discovered a couple of significant changes in Delphi 2009 that created some unexpected problems.