Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-11

Generics

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Albin Pučnik

Hi,

As I can see, there already is some support for generics in FreePascal, but only

for classes. Will records, their operators and free functions be supported too ? Could

someone of core developers explain the intended syntax for generics and give few

basic examples ?

Bine

Reply by email

Florian Klaempfl
to Albin Pučnik
Show quoted text 7 lines
Hi, As I can see, there already is some support for generics in FreePascal, but only for classes. Will records,

Records are already supported.

their operators and free functions be

Probably not in the upcoming 2.2 and even if they will, you will have to specialize them explicitly. We won't follow the C++ mess with auto specialization of operators and functions.

Show quoted text 6 lines
supported too ? Could someone of core developers explain the intended syntax for generics and give few basic examples ?

tgeneric*.pp in http://svn.freepascal.org/svn/fpc/trunk/tests/test/

But this still could change so don't submit bug reports if we change the syntax or semantic ;)

Reply by email