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

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.

Generic Methods and Type Inferencing

In the new Delphi forums recently, Barry Kelly responded to a question about lambda expression syntax in Tiburón with this observation: This syntax needs type inference. Our compiler was not originally written to support type inference, but work to support type inference is orthogonal to supporting anonymous methods. …  you’ll need to provide the full declaration type, for now. In other words – as I understand it – Tiburón/Delphi 2009 will not (initially at least) support type inferencing.  To my mind this dramatically reduces the attractiveness of Generic Methods.

Multicast Events – Part 2

Having covered some of the basic use of multicast events, in this second post I shall start to build the implementation.  In this first iteration we will provide the basics of a multicast event – managing and calling multiple handlers and the ability to enable and disable an event. The test project used in the previous video demonstration may also now be downloaded for you to experiment with if you wish.