Hi all,
Stefan has working for a while on the refactoring of the Collections framework. Here it is a short description on what happened:
Background:
The original IEnumerable<T> interface is very easy to use but it contains many "extension methods" which cause HUGE and exploding binary size compared to the RTL version.
Restrictions:
1) Delphi does NOT support interface helper
2) Delphi does NOT support generics methods for interfaces
3) smart linker won't work for interface
What's New
At present, we moved MOST extension methods (e.g. Where, Take, TakeWhile, First, FirstOrDefault, Single, SingleOrDefault, etc.) from Spring.Collections.IEnumerable<T> interface to Enumerable<T> record which can be accessed by IEnumerable<T>.AsEnumeable method.
The most benefit of introducing Enumerable<T> record is obviously reducing the binary size (Need prove) and make generic methods (like Select<T>) possible.
Introduced these NEW extension methods:
- Select, SelectMany
- Aggregate, GroupBy, ToLookup
- GroupJoin, Join, OrderBy, ThenBy
- ExceptWith, IntersectWith and UnionWith
NOTE: These changes are still not final decision so your feedback are very important.