[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warn when core functions are shadowed
From: |
Dupuis |
Subject: |
Re: warn when core functions are shadowed |
Date: |
Mon, 1 Feb 2010 02:51:34 -0800 (PST) |
Jaroslav Hajek-2 wrote:
>
> hi all,
>
> attached is a patch that enables Octave to issue a warning when core
> library or built-in functions are shadowed by user functions after
> addpath ().
> This may help users avoid unexpected failures (and subsequent false
> bug reports) caused by name clashes from their own functions or
> functions from packages (primarily old versions of packages that
> sometimes contains functions subsequently implemented or moved to
> core. This has bitten me more than once.)
>
> So now we'll see warnings like this:
>
> warning: function ./accumarray.m shadows a core library function
> warning: function /home/hajek/octave/nth_element.m shadows a built-in
> function
>
> Enabling the warning also for files from "." was a bit tricky, because
> the "." directory was being treated in a complicated way, added
> multiple times.
> I modified things a bit, hope I didn't screw anything up.
>
> Currently the warning is hard-wired. Should it be configurable?
> Note that to test the patch you need to install the built binary,
> because run-octave adds the system path through command line params.
>
> Comments? OK to push?
>
>
To me it's a good thing. For instance, you may have an old implementation of
a once missing function lying in your personal path, which prevents the
actual implementation from being used. Tracking such issues may be tedious.
Regards
Pascal
--
View this message in context:
http://old.nabble.com/warn-when-core-functions-are-shadowed-tp27401747p27402374.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.
- warn when core functions are shadowed, Jaroslav Hajek, 2010/02/01
- Re: warn when core functions are shadowed,
Dupuis <=
- Re: warn when core functions are shadowed, Robert T. Short, 2010/02/01
- Re: warn when core functions are shadowed, Jaroslav Hajek, 2010/02/01
- Re: warn when core functions are shadowed, Robert T. Short, 2010/02/01
- Re: warn when core functions are shadowed, John W. Eaton, 2010/02/01
- Re: warn when core functions are shadowed, Jaroslav Hajek, 2010/02/02
- Re: warn when core functions are shadowed, John W. Eaton, 2010/02/02
- Re: warn when core functions are shadowed, Jaroslav Hajek, 2010/02/02
- Re: warn when core functions are shadowed, John W. Eaton, 2010/02/02
warn when core functions are shadowed, John W. Eaton, 2010/02/01