The feature I'd most like to see in Delphi is....

Non generic interfaces should be able to contain generic methods

I can define a class like this:

TDeserializer = class
public
function Deserialize<T: IDeserializable>(SerializedObject: string): T;
end;

But I'm not able to hide this class behind an interface since that is not possible:

IDeserializer = interface
function Deserialize<T: IDeserializable>(SerializedObject: string): T;
end;

I don't see any reason why this shouldn't work.

5 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base