[lazarus] About compatibility???

Marco van de Voort marcov at stack.nl
Fri Mar 8 07:57:00 EST 2002

> On Sat, 9 Mar 2002, Matjaz Mihelic wrote:
> > or make this bastard, does something like that, so unit headers would be
> > obsolete. Every got dam'n lib comes with devel. We'd gain instantly
> > access to whole api.
> >
> > Let's see now there will be gtk2, how long will it take to translate
> > headers, half of the time to gtk3, we always lose. We could do some good
> > thing.
> See my other mail for some serious obstacles to this approach.
> If you can solve these without changing the compiler/language,
> fine. If not: There is a problem :-)
> Personally, I think that h2pas can be extended so it tries to do a
> better job, and that it should be used to create 'temporary' units
> which are produced on the fly.

I don't think that automatic conversion is feasable. Even if it would work
reasonably for some sources, simple rearrangements (introductions of macro's
in newer minor versions) could break the Pascal interface, while C would
keep running. 
It would require awful lot of work, and still would be fragile.

I think the best thing available is try to speed up conversion time by
enhancing h2pas with some tweaked codetools edit component, so interactively.

> The most I can agree with is to add a new keyword 'usesheader' to pascal:
> uses unitA; UnitB;
> usesheader libC1,libC2;

Please no additions! {$useheader xx} then.

More information about the Lazarus mailing list