> On Jun 7, 2019, at 3:50 PM, Sven Barth via fpc-devel 
> <[email protected]> wrote:
> 
>   generic procedure MemCopy<T>(Dest, Src: specialize TPointerType<T>.PT; Len: 
> PtrUInt);
>   begin
>     while Len > 0 do begin
>       Dest^ := Src^;
>       Inc(Dest);
>       Inc(Src);
>       Dec(Len);
>     end;
>   end;

May I ask where the syntax for “specialize” came from? Delphi doesn’t use it 
nor does any other language out there. Honestly it’s extremely verbose and 
makes me want to avoid generics sometimes. I just don’t get it. I will say that 
I like the “generic” addition to type declarations though because it makes it 
more clear what they are.

Regards,
        Ryan Joseph

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to