[fpc-devel] Improved RTTI compromise

Sven Barth pascaldragon at googlemail.com
Wed Dec 7 11:22:39 CET 2016


Am 07.12.2016 08:50 schrieb "Michael Van Canneyt" <michael at freepascal.org>:
>
>
>
> On Tue, 6 Dec 2016, Maciej Izak wrote:
>
>> 2016-12-06 17:46 GMT+01:00 Michael Van Canneyt <michael at 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).
>
>
> I am not sure this is possible. The structures exposed in the typinfo
> interfacee mimic the info the compiler generates in the binary.
>
> If the compiler generates different info than Delphi, you cannot retrieve
it in a delphi-compatible way.
>
> Trying to generate the exact same information as Delphi is IMHO not the
right path.
>
> What is needed is an API that gives you the info contained in the
internal structures.

That's what the RTTI unit is there for. It provides a higher level API to
the type information than typinfo does.

>
>> 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...
>
>
> No-one is ignoring RTII. I have contacted Joost on multiple occasions to
> merge his work into trunk. I get a lot of questions about it. But I cannot
> do the work myself. If I could, I would. I am waiting for the attributes
> since a long time.
>

I've now added that to the list of my near term projects, together with
interface RTTI.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20161207/90cf42f0/attachment.html>


More information about the fpc-devel mailing list