The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Jason Southwell (from arcana) just published DuckDuckDelphi: a unit to do Duck typing in Delphi XE2 (not XE)

Posted by jpluimers on 2012/02/16

If you haven’t seen Jason announce this in the general Delphi 3rd party newsgroup or his announcement thread on the FaceBook Delphi Developer group yet, this is a definitive must read:

Jason Southwell (from arcana) just published DuckDuckDelphi: a unit to do Duck typing in Delphi XE2 (not XE):

Duck Duck Delphi

DuckDuckDelphi is an Open Source (MIT License) unit for Delphi XE2 which adds duck typing functionality to a normally strongly typed language.

Great stuff that makes a truckload of my code so much easier to maintain.

–jeroen

via arcana – DuckDuckDelphi.

(Edit: 1400 UTC+1 Sorry, wrong boolean; wrote “and” but should be “not” XE).

8 Responses to “Jason Southwell (from arcana) just published DuckDuckDelphi: a unit to do Duck typing in Delphi XE2 (not XE)”

  1. antonio's avatar

    antonio said

    Duck type? Isn’t that what stage hands use to stick wires to the floor?

  2. If anyone wants to be responsible for XE compatibility, I can make them a contributor to the project. I don’t run XE any more and have no desire to maintain anything less than XE2.

    • Markus's avatar

      Markus said

      @Jason, a quick glance at the source indicated, that TRttiIndexProperty is quite important for a lot of functionality. Since this is not available for XE, I think it will not become easy to make it compatible with XE. Since I don’t have XE2 I can’t have a look into Delphi’s RTTI unit to see how complicated it would be to implement something similar for XE. I even don’t know if XE actually generates RTTI for indexed properties and that the guys at Embarcadero simply forgot to surface it in the XE reflection classes or if no RTTI for indexed properties is generated at all. If I find some spare time, I will have a look at it, as I see a lot of potentials for your duck typing framework.

      • By removing TRTTIIndexedProperty, the only limitation would be that you would be unable to get or set values of indexed properties. Other properties should work fine.

        Having said that, I’m not sure if there are other limitations or not.

  3. Markus's avatar

    Markus said

    Not entirely compatible with Delphi XE. It uses TRttiIndexedProperty which was added in XE2. In addition the source uses scoped unit names. But easy to adapt to XE.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.