On 06.12.2016 21:17, Maciej Izak wrote: > > 2016-12-06 17:46 GMT+01:00 Michael Van Canneyt <mich...@freepascal.org > <mailto:mich...@freepascal.org>>: > > The Delphi TypInfo unit also exposes the attributes. > > > My message was unclear - I mean that we can hide incompatible part of > TypInfo. Type TAttributeData is located in TypInfo (sooner or later that > part of TypInfo will be corrected - but IIRC for that "Invoke" function > is needed). RTTI.pas is rather fine (need to check).
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). > or second option: > > compiler hinting directive "experimental" for TypInfo.TAttributeData. > Good temporary deal for all (I think)... > > anyway any option is much better perspective than ignoring RTTI.pas for > long long long time... 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) Regards, Sven _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel