> On Feb 22, 2023, at 8:11 PM, Sven Barth via fpc-devel 
> <fpc-devel@lists.freepascal.org> wrote:
> 
> Some additional constraints might be added. However I have none of them 
> planned currently and enough other things to do. 
> 

I think Delphi basically has the same constraints as C# so FPC is in that same 
category. Swift has additional constraints for compiler types but I think they 
can pull that off because they have protocols such as “Numeric” which can be 
used on integer and floating point types.

It does seem incomplete that you can’t make a generic constrained for string 
types for example. Why don’t more languages have that? It seems like an obvious 
feature which should be supported.

Regards,
Ryan Joseph

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to