[m-dev.] syntax proposals
Thomas Conway
conway at cs.mu.OZ.AU
Thu Nov 8 09:45:09 AEDT 2001
On Wed, Nov 07, 2001 at 08:38:22PM EST, David Jeffery wrote:
> > Another alternative might be something like:
> >
> > :- begin_typeclass c(T).
> > :- func f(T) = int.
> > :- pred p(T).
> > :- mode p(in) is semidet.
> > :- end_typeclass c(T).
>
> Interestingly, this is almost exactly the syntax Ioriginally
> proposed for type classes in Mercury many, many
> years ago. (Gee I feel old now).
>
> At the time, the reason people rejected this syntax was
> that is was fealt that a single entity such as a type class
> declaration should be a single syntactic entity (and
> hence the current one was born). I'm not sure that this
> was actually very solid reasoning --- after all, we have
> no problem with representing a module by a series
> of terms rather than one massive term.
I would argue that this means that we got the module system
syntax wrong, not the other way round. ML uses a single syntactic
entity for module declarations, and it is nice.
my 2c,
Thomas
--
Thomas Conway )O+
<conway at cs.mu.oz.au> 499 User error! Replace user, and press any key.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list