Re: overriding vs namespaces

new topic     » goto parent     » topic index » view thread      » older message » newer message

For overriding existing routines, can I suggest a new Euphoria keyword:

Forget open

This could be used on variables as well as routines.

Arthur Crump

Matt Lewis wrote:
> 
> 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:
> }}}
<eucode>
> -- print.e
> global procedure print(...)
> 
> -- app.ex
> include print.e
> 
> print(...)
> </eucode>
{{{

> 
> Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu