bugGNU Octave - Bugs: bug #31821, Function handles for nonexisting...

 
 

bug #31821: Function handles for nonexisting functions

Submitted by:  jkirby <jkirby>
Submitted on:  Wed Dec 8 02:10:54 2010  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 1 - LaterItem Group: Feature Request
Status: Wont FixAssigned to: None
Originator Name: jkirbyOpen/Closed: Closed
Release: devOperating System: Other

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed May 23 11:26:55 2012, comment #4:

Give that this bug has been marked as "Won't fix for 18 months" I'm closing this bug

D.

David Bateman <dbateman>
Project Member
Sun Dec 12 20:25:25 2010, comment #3:

That would be fine with me. I still think it's a useless Matlab quirk, though. If for whatever reason you want to defer resolving the name reference, why not pass just the name?
In any case, feel free to try (and please cc me the patch), but I think my scarce time for Octave is better spent on something else.

Jaroslav Hajek <highegg>
Fri Dec 10 21:38:30 2010, comment #2:

Even if it was hidden behind one of the compatibility flags?

jkirby <jkirby>
Fri Dec 10 20:35:46 2010, comment #1:

I strongly advise against such a change. This "feature" (IMHO it was originally a Matlab bug) is almost useless and the rules in Matlab are quite obscure. Octave's behavior, on the other hand is much better in that if you misspel a function name, it errors at construction of the handle, which is where the bug actually is, instead of waiting until it's used, which may be completely elsewhere.
I'm changing this to won't fix for the time being.

Jaroslav Hajek <highegg>
Wed Dec 8 02:10:54 2010, original submission:

This is a direct copy from a discussion a few years ago: http://octave.1599824.n4.nabble.com/Function-handles-for-nonexisting-functions-td1654944.html

"In Matlab, I can create function handles to nonexisting functions
using str2func or the @ operator. Only when I try to call the
function, an error like the following occurs:

??? Undefined function or method 'blabla' for input arguments of type 'double'.

In Octave, it seems that existance of the function is checked already
upon creation of the function handle. This means that the str2func or
@ call can fail with something like

error: error creating function handle "@blabla"

which would not happen in Matlab."

It would be nice to have this lazy-evaluation in Octave.

jkirby <jkirby>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dbateman (Posted a comment)
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by highegg (Posted a comment)
  • -unavailable- added by jkirby (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed May 23 11:26:55 2012dbatemanOpen/ClosedOpen=>Closed
    Wed Sep 28 19:04:20 2011rik5Priority5 - Normal=>1 - Later
    Fri Dec 10 20:35:46 2010higheggStatusNone=>Wont Fix

    Back to the top


    Powered by Savane 3.1-cleanup