[m-dev.] treating `list__append' as `list:append'
Fergus Henderson
fjh at cs.mu.oz.au
Mon Feb 10 12:52:31 AEDT 1997
Peter Schachte, you wrote:
>
> > Add code to treat `__' as an alternative syntax for module qualification.
> > The code is currently commented out, because we don't yet support
> > module qualification of data constructors. It should be re-enabled
> > as soon as we do.
>
> I hope this is a "feature" that will be removed after a release or
> two. In the long run it really doesn't seem like a very nice
> linguistic feature, though I can see that breaking all users' calls to
> library predicates could be considered antisocial.
I agree it should eventually be removed, although I think we should
probably leave it in for more than one or two release.
> > Index: prog_io.m
> > + string__sub_string_search(Name, "__", LeftLength),
> > + LeftLength > 0
>
> What if LeftLength = 0 (eg, "__foo")? I would expect this to be
> treated as a variable, but this code, when uncommented, will return
> ok(unqualified(Name)). Is this correct?
Yes, it is correct.
>If Name couldn't be of the form "__foo", perhaps you could omit the test?
If you write
__foo
then that will be treated as a variable.
If you write
'__foo'
then that will be treated as an (unqualified) functor.
--
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.
More information about the developers
mailing list