[fpc-pascal] Interface syntax: Is possible don't use specialize in mode objfpc?

Sven Barth pascaldragon at googlemail.com
Sun Jul 19 22:36:10 CEST 2015


Am 19.07.2015 21:37 schrieb "Florian Klämpfl" <florian at freepascal.org>:
>
> Am 16.07.2015 um 22:40 schrieb Sven Barth:
> >
> > In the end your code above will look like this in mode ObjFPC:
> >
> > === code begin ===
> >
> > var
> >   X: specialize SmartObj<specialize TDictionary<specialize
WeakObj<specialize TList<Integer> >,
> > string> >;
> > // the spaces between the "> >" are added, because I don't know yet
whether I'll be able to deal
> > with the fact that the scanner always converts ">>" to "shr" (and "<<"
to "shl")
>
> Lucky you that pascal does not allow inline type declarations like:
>
> var
> X: specialize SmartObj<specialize TDictionary<specialize
WeakObj<specialize TList<-32768..$10000>>
> 2> >,string> >;

*shudders* That is a good reason for me not to implement const parameters
for generics...

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


More information about the fpc-pascal mailing list