TEnumerable.GroupBy With Delphi 12

34 views
Skip to first unread message

Esteban Lombardo

unread,
Apr 16, 2024, 6:08:48 AMApr 16
to Spring4D
Hi,
i'm migrating from Delphi 11 to Delphi 12 but i have some problem with Spring4D.

I use the TEnumerable.GroupBy function that take like parameter an enumberable and a generic function for keySelector.

The problem is that the old version of Spring4D take a TFunc<T, TKey> and the new version instead Func<T, TKey>.

What the difference between Func and TFunct?

thank you very much

Stefan Glienke

unread,
Apr 16, 2024, 6:10:12 AMApr 16
to Spring4D
The difference is that Func from Spring.pas has const on all parameters while TFunc from SysUtils does not.
Depending on the type this has major performance implications.

Reply all
Reply to author
Forward
0 new messages