[fpc-devel] extending platform flag request

Marco van de Voort marcov at stack.nl
Fri Sep 28 10:55:09 CEST 2007

> 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 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.

More information about the fpc-devel mailing list