[fpc-pascal] Generics in Delphi mode?

timveldhuizen tim at timveldhuizen.nl
Wed Mar 30 20:59:42 CEST 2011


Hi. I just found out today that generics also work in Free Pascal (and as I
understand it, it was even implemented before it was added in delphi :) ).

However, the way it was implemented makes me frown a bit. Not that it is
that bad or unusable or illogical, but as I use Delphi mode, I was expecting
it to be compatible to the way it works in delphi. In other words: with the
same syntax and same generic types like TList and TObjectList etc... Now I
still have to add a number of $IFDEF's everywhere to make it compatible with
delphi even though I i've used:

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

I hope very much that this will be changed to a delphi compatible style,
because if even the delphi compatible mode starts to deviate from delphi,
then how far will the compatibility mode implementation be from the
Embarcadero delphi language spec in something like 5 years from now?

Greetz,
Tim.

--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Generics-in-Delphi-mode-tp4272087p4272087.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list