[fpc-devel] Interface scope incompatibility with Delphi

Marco van de Voort marcov at stack.nl
Wed Nov 10 13:32:15 CET 2010

In our previous episode, Graeme Geldenhuys said:
> > Yes, valid and documented code is supported. 
> > This is invalid code which just so happens to work.
> > 
> > There are more cases where we are incompatible. All of them for good reason.
> I'm still searching the archives. Mind you tell me what would be so bad in
> this case to be delphi compatible? Is there actually any negative points to it?

I'd search for mantis items (closed probably as won't fix). Then maybe in
the archives around the same time as activity there.

As on the topic (since I don't know the exact tradeoffs of this feature) is
that it is very difficult to correctly judge such bits. It isa
slippery slope:

E.g. afaik the Jedi JCL prepares tracebacks using TD32 debug info, and maybe
apps and vendors use JCL and JVCL, and many others may have there own
traceback routines based on TD32 debug info Does this mean we have to
emulate Borland internal debug info to the byte?

Besides this, "all" the versions of Borland that support interfaces are one
and the same compiler, for x86.  (the 16-bit compiler D1 didn't support
interfaces, and Kylix was x86 too).  Trying to guarantee these kind of
implemenation details could bring you into problems on other architectures,
where calling conventions and prologue/epilogue tradeoffs are different.

I'm the first to say more Delphi compat is a good thing, but you have to
draw the line somewhere. And this goes pretty far.

It would be wise to try so see further than your immediate pain, and make
that the center of the universe.

More information about the fpc-devel mailing list