This week I had to maintain some legacy code that uses many interfaces and supports in order to find out if a specific interface is supported:

One of the tasks I had to do is to replace the interfaces with pure Delphi objects. That’s why I wondered if there is a chance to write something similar for objects.

I played a bit and found the following:

This entry was posted in Delphi, RAD Studio 10.2 Tokyo, Tips and Tricks, Uncategorized. Bookmark the permalink.

4 Responses to Supports

  1. Stefan Glienke says:

    FWIW I like that in C# the softcast does not raise but returns nil if it fails and that you have the null coalescing operator.

    So they can write:


Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.