Unexpected behavior with built-in

John W. Eaton jwe at octave.org
Tue Jul 21 11:51:56 CDT 2009


On 21-Jul-2009, Joel LeBlanc wrote:

| This is good John...  Here is what I think we should do:
| When calling built-in we should search the list in reverse order.
|  built-in then function on path (from lowest on path to highest), etc.
| 
| This will make builtin work as \emph{I} expect, and I'm trying to see if
| someone else has an example of why my thinking is flawed.

I checked in the follwoing change.

  http://hg.savannah.gnu.org/hgweb/octave/rev/0c785ad961fa

| Then, I would add a "next" flag that starts where you currently are in that
| list, and starts search down the list.  So for the example I sent, it would
| start at function on the path and look for a function lower on the path,
| then try a builtin.  This handles the overloading use case that I eluded to.
| 
| Does that seem reasonable?  Does it break any use cases that you can think
| of?

I'm not as interested in this change, so I suggest that if you are,
you implement it and propose a patch.  Maybe it would be better to use
a different name instead of "builtin" for this function?

jwe


More information about the Bug-octave mailing list