On Mon, 06 Sep 2004 16:02:45 -0500, 
Jeremy Nelson <[EMAIL PROTECTED]> wrote:

> In EPIC5, if you have an alias with the same name as a built in
> function then:
>       $:foo()         runs your alias
>       $::foo()        runs the built in function.
> 
> The question then is what shall $foo() do?  Shall it run your alias,
> or shall it run the built in function?  Presently, at this moment in
> time, for backwards compatability, it runs the built in function. 
> However, it would seem more sensible to make it behave like commands
> do, and have it run your alias.

Consistancy is good.  Commands and functions should both use the : and :: notations, 
and the default meaning should be to run the latest defined.  The old //command 
notation should be taken out of the client, and moved into a compatibility script (it 
is nice and handy, but shouldn't be the notation of choice for scripts).

This : and :: notation, should also be in line with localisation of variables, with :: 
denoting the "global" scope (vs. script- or function-local) in case of variables, or 
the "built-in" scope (vs. a command defined by one script or another) in case of 
commands and functions.


> HOWEVER, this breaks backwards compatability because some people have 
> created aliases, by the same name as built in functions, with the
> expectation that their alias will never be called as a function!  This
> will break scripts, but perhaps this is a good change.

This is a good change.  It might be nice to provide a means to bind to just commands, 
or just functions, but making aliases overide both is a far lot better than only being 
able to overide commands.


-- 
Steven (of Steven and Julie)


Please, don't send me any attachment in Microsoft (.DOC, .PPT) format.
Read http://www.fsf.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT

Debian GNU release testing/unstable (Linux 2.6.7 i686)
 
_______________________________________________
List mailing list
[EMAIL PROTECTED]
http://epicsol.org/mailman/listinfo/list

Reply via email to