[m-rev.] for review: atoms in the debugger
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jan 4 16:32:47 AEDT 2002
On 04-Jan-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > > No it wouldn't. The formulae are an obvious consequence of the task of the
> > > predicate and the meaning of the input data.
> >
> > It wasn't obvious to me.
> > I had to think about it for a fair bit.
>
> Not enough.
Indeed!
Either my brain has stopped functioning properly (a definite possibility ;-),
or it really isn't obvious.
> I added the comments
> % "()", plus Arity-1 times ", "
> and
> % "()", " = ", plus Arity-2 times ", "
> in the two arms.
Thanks.
> > > This is not an error message for a function application. It is a
> > > compressed representation for an atom. Deleting the +1 would be
> > > misleading.
> > Why?
>
> Because it would imply that there are only n-1 subterms available to be
> browsed, when in fact there are n. It implies that the browser command "^n"
> would fail, when in fact it would succeed.
OK, that makes sense. If we're treating the function return value as the
"Arity+1"th argument for the purpose of browsing, then I agree it's a
good idea to use the +1 notation.
I'm not sure it's such a great idea to treat the function return value
as the "Arity+1"th argument -- it might be better to use something different,
e.g. "^r", to access the function return value -- but I'm not going to start
redesigning that at this point.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list