[fpc-devel] Improved RTTI compromise

Maciej Izak hnb.code at gmail.com
Tue Dec 6 23:27:24 CET 2016


2016-12-06 22:49 GMT+01:00 Sven Barth <pascaldragon at googlemail.com>:

> We won't need Invoke() function for attributes, since Joost's branch
> generates a function that calls the attribute class' constructor with
> the provided values and returns the created instance.
> This has the advantage that it's a) faster and b) works on all supported
> platforms whereas Invoke() will not be supported on all platforms at the
> beginning and additionally requires the parameter RTTI to be in place
> (basically what's introduced with the Interface RTTI branch).


Yes I really like all of mentioned advantages!... at the beginning I was a
little confused how it works without Invoke in RTTI.pas. Indeed good idea,
but if we really like to have Delphi clone of attributes (with logic and
typinfo data) then Invoke is needed.


> I've just looked through Joost's branch. One of the biggest problems is
> the unit list and the list of types contained in each unit. Since this
> is only introduced in the branch and the introduction of dynamic
> packages completely shakes that up (I want to be able to look up types
> of packages that were dynamically loaded after all ;) ).
> So if we agree that for now TRttiContext either is removed or its
> methods return Nil and attribute support is also removed for now then we
> can indeed move the RTTI unit rather unceremoniously to trunk (I'll need
> to rework Joost's branch anyway).
> Since we now also support generic functions we can also add the missing
> functions of TValue ;) (patches welcome once we've indeed merged it)
>

Sure, very welcome. TValue is good for beginning (would be cool to use
TValue with MO). RTTI.pas might be good start point for early
implementation of "Invoke" for few platforms.

-- 
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20161206/c83f002e/attachment.html>


More information about the fpc-devel mailing list