[fpc-devel] Problem with generic parameter

Sven Barth pascaldragon at googlemail.com
Mon Jan 2 14:30:20 CET 2017


Am 02.01.2017 05:34 schrieb "Thorsten Engler" <thorsten.engler at gmx.net>:
>
> Hi,
>
>
>
> Independent of what Delphi may support or not (and I agree that at a
minimum in $mode Delphi fpc should not require that IFDEF)…
>

Delphi's generics are hard to parse and FPC's generics simply missed some
functionality (and still do in some cases) independently of the mode (e.g.
generic methods simply did not exist (they do now in 3.1.1) or one still
can't declare generics inside other generics (one of the next things I plan
to tackle)).

>
> in a modern compiler I would expect the generic type parameter to be
optional in this specific scenario and the compiler infer it from the type
of the parameters.

As long as Delphi doesn't implement type inference I won't touch that topic
with a ten meter pole and even then it would not be high priority on my
list.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170102/f14713f7/attachment.html>


More information about the fpc-devel mailing list