29.08.2010 21:39, Dimitri Smits wrote:
At the present state of fpc compiler it is technically imposible to
port
delphi rtti unit. To do this you need first to implement the next
compiler features:

1. Extended records (methods, class operators)
2. Generics as in delphi
3. Attributes
4. scopeable RTTI ($RTTI directive)

I mean that for implementing RTTI unit compatible by interface with delphi you need that 3 features I wrote about. Or how you will port for example TValue record:

  TValue = record
  private
    function GetIsEmpty: Boolean;
    ...
    procedure Get<T>(out Result: T);
  public
    // Easy in
    class operator Implicit(const Value: string): TValue;
   ...

1. GetIsEmpty - a method in a record.
2. Get<T>(out Result: T) - generics as in delphi
3. class operator Implicit(const Value: string): TValue - delphi class operators

I was wrong about Attributes - seems they are not used in the rtti unit interface.

Best regards,
Paul Ishenin.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to