Argh!

Posted by Kirby Turner on May 4, 2005

The way interfaces work in Delphi for Win32 stinks. From what I have read it seems that interfaces were forced in to work with COM. But even if you are not using COM, interfaces imposes COM like behaviors such as ref counts and interfaces must have a GUID. But what really ticks me off is that you cannot cast an interface to an object.

For years I have abstracted framework and application features through interfaces. Now I can’t use them and it means I have to change the way I think. This limitation, which I wish I knew about 2 months ago, makes me think I should have used C# for my app.

In the end, I will be happy with my selection of Delphi. But I’m a bit ticked off at it for the moment.

For those using Delphi for .NET, this will not be a problem. Interfaces work the way you would expect, and you can cast objects to interfaces and interfaces to objects.


Posted in uncategorized. Tagged in .