Re: [fpc-devel] Feature announcement: Generic functions, procedures and methods

2015-11-24 Thread Sven Barth
Am 24.11.2015 08:04 schrieb "Michael Schnell" : > > Is this syntax candy for automatically creating multiple functions (completely dedicated code for each type (combination) it is called with) (in fact optimizing for CPU usage), or is a single code sequence generated that takes

Re: [fpc-devel] Feature announcement: Generic functions, procedures and methods

2015-11-23 Thread Chriss Kalogeropoulos
Hi all, If type inference is not planned, then do you have an alternative to support linq like expression methods ? If type inference is not used then the syntax is very verbose if not ugly. Also I though that type inference is kind of important for proper lambda support but I might be wrong.

Re: [fpc-devel] Feature announcement: Generic functions, procedures and methods

2015-11-23 Thread Sven Barth
Am 23.11.2015 13:12 schrieb "Chriss Kalogeropoulos" : > > Hi all, > > If type inference is not planned, then do you have an alternative to support linq like expression methods ? If type inference is not used then the syntax is very verbose if not ugly. > > Also I though that

Re: [fpc-devel] Feature announcement: Generic functions, procedures and methods

2015-11-23 Thread Michael Schnell
Is this syntax candy for automatically creating multiple functions (completely dedicated code for each type (combination) it is called with) (in fact optimizing for CPU usage), or is a single code sequence generated that takes different branches at certain locations (in fact optimizing for

Re: [fpc-devel] Feature announcement: Generic functions, procedures and methods

2015-11-22 Thread Anthony Walter
Sven, fair enough. I'll test out what you've published and if I find anything interesting (strange compiler errors, edge cases, useful scenarios) I'll post replies. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Feature announcement: Generic functions, procedures and methods

2015-11-21 Thread Maciej Izak
2015-11-21 19:09 GMT+01:00 Sven Barth : > The compiler will error out like this: > > === output begin === > > Target OS: Linux for i386 > Compiling ./fpctests/tgenroutines.pp > tgenroutines.pp(9,47) Fatal: Syntax error, ")" expected but "+" found > Fatal: Compilation

Re: [fpc-devel] Feature announcement: Generic functions, procedures and methods

2015-11-21 Thread Sven Barth
On 21.11.2015 20:01, Maciej Izak wrote: 2015-11-21 19:09 GMT+01:00 Sven Barth >: The compiler will error out like this: === output begin === Target OS: Linux for i386 Compiling ./fpctests/tgenroutines.pp

Re: [fpc-devel] Feature announcement: Generic functions, procedures and methods

2015-11-21 Thread Maciej Izak
2015-11-21 18:32 GMT+01:00 Sven Barth : > Hello together! > > I'm pleased to finally announce the addition of generic functions, > procedures and methods (collectively called "routines") to Free Pascal > which allows writing type safe methods that can be used for

[fpc-devel] Feature announcement: Generic functions, procedures and methods

2015-11-21 Thread Sven Barth
Hello together! I'm pleased to finally announce the addition of generic functions, procedures and methods (collectively called "routines") to Free Pascal which allows writing type safe methods that can be used for multiple types. Syntax: The syntax for declaring a generic routine is similar