Smylers wrote:
TSa writes:
> Ruud H.G. van Tol wrote:
> > TSa schreef:
> > > A(|)B produces a subtype of A and B, and that A(&)B produces a
> > > supertype
> >
> > Are you sure?
>
> Very sure ;)
In which case that provides a handy example supporting Larry's
suggestion that this is confusing, with some people expecting it to work
exactly opposite to how it does.
It's a terminology issue. The OO terms "subclass" and "superclass"
are counterintuitive, in that a "superclass" is more limited than the
"subclass" that is derived from it - that is, the "subclass" provides
a superset of the elements of the "superclass". I have studiously
avoided using that terminology for this very reason. Well, that and
the fact that we're talking about roles here, not classes; and
conceptually, roles are supposed to be more egalitarian than classes -
"super-role" and "sub-role" would carry too much of a hierarchal
connotation for what roles are supposed to be.
(&) and (|) would actually reflect your intuition regarding the
capabilities of the result, in that a role arrived at by means of (&)
would provide fewer options than the individual roles used to create
it, while a role arrived at by means of (|) would provide more
options.
It doesn't really matter which way is right -- merely having some people
on each side, all naturally deriving what makes sense to them -- shows
that implementing this would cause much confusion.
I'll have to differ from you here. We (the language designers) get to
choose how the concepts get presented, and presentation is everything
(or pretty darn close). If we make a point of highlighting the "set
operations" perspective and avoiding traditional type theory
terminology (which, as Larry pointed out and TSa demonstrated, is very
much inside out from how most people think), we can avoid most of the
confusion you're concerned about.
--
Jonathan "Dataweaver" Lang