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

 
 

bug #31821: Function handles for nonexisting functions

Submitted by:  jkirby <jkirby>
Submitted on:  Wed 08 Dec 2010 02:10:54 AM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  1 - Later Item Group:  Feature Request
Status:  Wont Fix Assigned to:  None
Originator Name:  jkirby Open/Closed:  Closed
Release:  dev Operating System:  Other

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Tue 20 Mar 2018 02:10:12 PM UTC, comment #6:

I think this issue indeed requires a little bit more attention. Maybe it is sane to leave the bug open, and change the "wont fix".

Juan Pablo Carbajal <juanpi>
Project Member
Tue 20 Mar 2018 01:18:36 PM UTC, comment #5:

I would encourage you to please reconsider... It may be a Matlab bug, depending how you feel about it, but please note that it can certainly affect negatively to Octave users (http://savannah.gnu.org/bugs/?53363):

If a matlab user saves one of those function handles in a mat file together with other relevant data, an octave user will not be able to access that data because octave fails to load the mat file due to this problem with function handles.

avlas <kupiqu>
Wed 23 May 2012 11:26:55 AM UTC, 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 12 Dec 2010 08:25:25 PM UTC, 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 10 Dec 2010 09:38:30 PM UTC, comment #2:

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

jkirby <jkirby>
Fri 10 Dec 2010 08:35:46 PM UTC, 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 08 Dec 2010 02:10:54 AM UTC, 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

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

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

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-18 siko1056 Dependencies- => bugs #53363 is dependent
    2012-05-23 dbateman Open/ClosedOpen => Closed
    2011-09-28 rik5 Priority5 - Normal => 1 - Later
    2010-12-10 highegg StatusNone => Wont Fix

    Back to the top


    Powered by Savane 3.3