[E-Lang] Immutable map operations
Tyler Close
tclose@oilspace.com
Thu, 29 Mar 2001 09:21:16 +0100
Dean wrote:
> In E, there is no
> contract for "&",
> it's just a string. There's no place to document that the
> associated
> implementation is associative or commutative or supports basic
> set-theoretic axioms. But those guarantees are important,
> and I would much
> rather have assurance that they held for sets, regions, functions,
> bitvectors, etc. than have other semantics wedged into them
> to leverage the
> syntax.
Pursuant to my request for some code examples of "surprising
operations", I think E should document the contract for the various
operators by creating a test suite of programs that check the various
axioms that an operator implementation must obey. Once such a test
suite has been agreed on, it will be possible for a library designer
to get a definitive and objective answer as to whether their use of
the operator expansions is "good" or "bad" design. The prominent
existence of this test suite in the E download should be enough to
radically reduce the occurence of "wanton abuse of operator
expansions" that language like C++ suffer from.
Tyler