You can take D as easy bridge to learn C++, or you can take D as modern programming language and replaces the ancient Pascal or even C.

MetaClass

“Class References” in Delphi/Pascal

SuperClass = class
    x: integer;
    constructor Create(value: integer)
    begin
      x := value;
    end;
end;

SubClass1 = class(SuperClass)
end;

SubClass2 = class(SuperClass)
end;

MyMetaClass = class of SuperClass;

//Assigning MetaClass of subclass, 
//compiler only accept classes that derived from SuperClass

var
   MC: MyMetaClass;

//Assigning
   MC = SubClass1;

//Creating object

   MyObj = MC.Create(10);

More…