Re: overriding vs namespaces
- Posted by Matt Lewis <matthewwalkerlewis at gma?l.co?> May 15, 2008
- 593 views
Kat wrote: > > It allows for minimal changes to existing code, does not break existing code, > and is the ONLY method for "overloading" an internal function, in my proposal. > For instance, this would be illegal: > }}} <eucode> > junk = open(blah) -- as an override of internal open() > </eucode) > this would be legal inside ftp.e (for example): > }}} <eucode> > junk = ftp_open(blah): export as "open" > </eucode> {{{ > so it can be used like > }}} <eucode> > include ftp.e as ftp > ftp:open(someplace online) > </eucode> {{{ Actually, this would break some existing code:
-- print.e global procedure print(...) -- app.ex include print.e print(...)
Matt