[fpc-devel] extending platform flag request

Michael Van Canneyt michael at freepascal.org
Fri Sep 28 11:02:02 CEST 2007



On Fri, 28 Sep 2007, Marco van de Voort wrote:

> > On Fri, 28 Sep 2007, Marc Weustink wrote:
> > > No the property will always exist and always been written. Only an indication
> > > to the user can be shown that this is a property which might not work on all
> > > platforms
> > > IIRC, that's what the platform directive was meant for.
> > 
> > Only to say that code is platform specific. You get this only when
> > compiling.
> > 
> > Note that what you ask goes way beyond platform: you ask widget-set
> > dependencies.
> 
> Not really, e.g.
> 
> - make sure that the compiler can parse the platform list easily. (e.g. some form
>   of brackets "platform [ident1,ident2];")
> - pass the compiler a set of allowed strings, to catch misspellings.
> - generate some table with all the accepted strings, and the let the RTTI
> refer to it.

You have this kind of mechanism with the message string table, 
if you really really need it, I suggest it is handled there.

> > You should encode this kind of information in your interface
> > class, not in the RTII.
> 
> However I don't like the RTTI principle either. PPU ok, but not RTTI. There
> is enough dead/rarely used data in the binary as it is. It is only a matter
> of time till the next "easy" idea pops up.

This is exactly why I am not keen on adding this to RTTI.

Michael.



More information about the fpc-devel mailing list