[m-dev.] Module qualification of typeclass methods
Simon Taylor
stayl at cs.mu.OZ.AU
Wed Oct 31 03:32:20 AEDT 2001
On 31-Oct-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 30-Oct-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > Simon wrote:
> > > How about a different type of `include_module' declaration for which
> > > the child module is always imported when the parent is imported?
> > >
> > This seems to me the correct tradeoff, I like the idea.
> >
> > However back to the original question. Does anyone have any fundamental
> > difficulties with typeclasses introducing a new namespace? I as the
> > programmer know when writing the code which typeclass method I mean and
> > there is a mechanism by which to distinguish two methods with the same name,
> > hence I should be able to do it.
>
> You already can do it.
>
> If the suggested extensions to the module system are implemented,
> I don't see any additional benefit in having typeclasses introduce
> a new namespace.
The proposal is also a step backwards for classes that are already
defined in a module of the same name, for example library/enum.m.
With the proposed change, the methods of that class would be
enum__enum__to_int and enum__enum__from_int.
Simon.
--------------------------------------------------------------------------
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