Details
-
Type:
Wish
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.7
-
Fix Version/s: 0.7
-
Component/s: Runtime (Boo.Lang)
-
Labels:None
-
Number of attachments :
Description
Add a Mathematical Set class to Boo to support set operations.
- A set can be created from any IEnumerable
- Methods include: intersection, union, (left/right)difference and IsSubSet
- Operators: a | b (union), a & b (intersection), a - b (leftdifference), a ^ b (difference), a < b (strict subset), a <= b (subset).
Attached is a C# file that implements this proposed Set class.
The Iesi.Collections library (http://www.codeproject.com/csharp/sets.asp) could also be of interest here. The library contains a number of set classes with different features. The library is distributed with NHibernate, where the Iesi.Collections.ISet interface is used for set mappings.
I don't see the need to distribute a set library with Boo, unless set operations should become part of the language (I guess that won't happen). The standard .NET class library could need a set class, though.