[bitc-dev] DISCUSS: Name That Type Class!
David-Sarah Hopwood
david.hopwood at industrial-designers.co.uk
Sun Jul 20 15:31:28 CDT 2008
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".
> Predicates do not usually appear in types, however, so maybe this is
> okay here.
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 ?.
Nice uses an initial ? for option types:
<http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/OptionTypes>,
which avoids confusion with the Lisp convention (and the ? is in
the right place to be read as "possible" or "optional" or "maybe a").
--
David-Sarah Hopwood
More information about the bitc-dev
mailing list