Sign in Join

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

Mailing lists / fpc-pascal / 2015-02

Generic: generic type in generic methods

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

silvioprog

Hello,

I'm trying to port some of my drafts from Delphi to FPC, but I'm taking some problems. See this sample:

http://pastebin.com/Jb6UjDX9

Notice that I specialized the generic types directly in the method call. This is very useful, and allows one to use a clean syntax for direct calls in methods with generic types.

I believe that this feature is not implemented in FPC yet. So, I ask: is there any table to check the compatibility of generic types between FPC and Delphi?

Thank you!

Silvio Clécio My public projects - github.com/silvioprog
Sven Barth
to silvioprog
silvioprog wrote 14 lines
Hello, I'm trying to port some of my drafts from Delphi to FPC, but I'm taking some problems. See this sample: http://pastebin.com/Jb6UjDX9 Notice that I specialized the generic types directly in the method call. This is very useful, and allows one to use a clean syntax for direct calls in methods with generic types. I believe that this feature is not implemented in FPC yet. So, I ask: is there any table to check the compatibility of generic types between FPC and Delphi?

No, that feature is not implemented yet. It's however on my near term todo list.

And no, there is no table to check for compatibility.

Regards,
Sven

silvioprog
to Sven Barth
Sven Barth wrote 21 lines
On 08.02.2015 04:06, silvioprog wrote: > Hello, > > I'm trying to port some of my drafts from Delphi to FPC, but I'm taking > some problems. See this sample: > > http://pastebin.com/Jb6UjDX9 > > Notice that I specialized the generic types directly in the method call. > This is very useful, and allows one to use a clean syntax for direct > calls in methods with generic types. > > I believe that this feature is not implemented in FPC yet. So, I ask: is > there any table to check the compatibility of generic types between FPC > and Delphi? > No, that feature is not implemented yet. It's however on my near term todo list.

Great. I'll follow your changes via GIT log.

And no, there is no table to check for compatibility.

Hm... This table could be useful for who's doing code compatible with Free Pascal and Delphi (I'm making a small MVC structure that will be compatible with FPC and Delphi XE).

Regards, Sven
Silvio Clécio My public projects - github.com/silvioprog