[Python-Dev] I think my set module is ready for prime time; comments?
Thu, 25 Jan 2001 03:08:30 -0500
> Unfortunately, if values are required to be immutable, then sets of
> sets aren't possible... :-(
Sure they are. I wrote about how before, and Moshe put up a simple
implementation as a SourceForge patch. Not bulletproof, though: "consentng
adults". No matter *what* you implement, I'll find *some* way to trick it
into believing my sets are immutable <wink>, so don't worry about that.
Bulletproof is very hard, and is a minority distraction at best. IIRC, SETL
had "by value" semantics when inserting a set into another set as an
element, and had some exceedingly hairy copy-on-write scheme under the
covers to make that bearably quick. That may be wrong, though. Herman
Venter's Slim (Sets, Lists and Maps) language does work that way (Guido,
Herman was a friend of the departed Stoffel Erasmus, who you may recall
fondly from Python's very early days -- if *that* doesn't make sets
attractive to you, nothing will <wink>).
Ah! Meant to post this before:
That's a readable and very good intro to SETL Classic. People pondering
computerized sets should at least catch up with what was common knowledge 30
years ago <wink>.