March 2013

Anonymous Methods – John McDonald

John gave a presentation on anonymous methods, first introduced with Delphi 2009, also mentioning generics and RTTI and how they can be used with anonymous methods. The talk was illustrated with a series of examples (download 99KB). John also drew attention to the system.generics.defaults unit included with Delphi which contains many useful type definitions.

Further to John’s talk, during his symposium presentation Malcolm Groves showed how anonymous methods could be used to produce better code with a class accepting one method in production code, and another from a unit test harness.