On Sun, 2008-07-20 at 21:31 +0100, David-Sarah Hopwood wrote:
> Jonathan S. Shapiro wrote:
> > On Sun, 2008-07-20 at 17:43 +0100, David-Sarah Hopwood wrote:
> >> If it is obscure enough that conciseness doesn't matter, I suggest
> >> MutationInsensitivelyCompatible.
> > 
> > Unfortunately, I suspect it is not quite that obscure. I have asked
> > Swaroop to send out an example where it arises.
> > 
> > The closest I have come to something seems OK is:
> > 
> >   Mutable?
> > 
> > With the '?' indicating optionality rather than predication. My main
> > concern is that '?' is used by convention to mean predicates elsewhere
> > in LISP-like languages.
> 
> I'd find that quite confusing. The description you gave before for
> top-copy-compat didn't seem to be simplifiable to just "mutable".

Um. I was suggesting that

  (top-copy-compat 'a 'b)

could be written as

  (mutable? 'a 'b)

but I agree that this is confusing.

> Types / typeclasses are usually named either as nouns, or as adjectives
> describing the set of values intended to be of that type. So I would guess
> that a type called 'Mutable' was supposed to indicate values that are
> (in some sense) mutable, regardless of the presence or absence of ?.

The type (mutable T) indicates a mutable location whose value has type
T. The "top-copy-compat" that we are discussing is a type class. That
is: a type qualifier.

> Nice uses an initial ? for option types.

Yes. Option types is not what I meant here. The problem is merely that
top-copy-compat is so ugly.

shap

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to