[m-dev.] Re: Visual vs total arity clash example [fwd]

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jan 26 15:46:29 AEDT 2000


On 26-Jan-2000, Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> ----- Forwarded message from Peter Schachte <schachte at cs.mu.oz.au> -----
> 
> I would argue that (unlike DCGs) there's no reason to allow users to
> write EDCG clauses fully expanded.

I pretty much agree -- the only reason to support this is for
backwards compatibility.  But backwards compatibility is important.
If we want to rewrite the standard library using EDCGs, we need
to ensure that existing code using either DCGs, e.g.

	main --> io__write_string("hello world\n").

or using the fully expanded form, e.g.

	main(IO0, IO) :- io__write_string("hello world\n", IO0, IO).

does not suddenly break.

It would IMHO be fine in the long run, to break code using the fully
expanded form, so long as we do it gradually, i.e. first deprecating
the feature, and only removing it a few years later.

> Here's another idea for avoiding this problem:  put each EDCG
> predicate/function in an 'EDCG' submodule of its proper module, and
> export it from this module to the parent module.

I think that would be difficult, because by the point at which
we want to do the EDCG translation, we've already split out
the sub-modules, and we're processing one module at a time.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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