octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function handles for nonexisting functions


From: Judd Storrs
Subject: Re: Function handles for nonexisting functions
Date: Wed, 22 Apr 2009 19:16:10 -0400

On Mon, May 5, 2008 at 5:50 PM, Moritz Borgmann <address@hidden> wrote:
Is this common?  Are there other (reasonable) cases where it makes
sense to create a handle to a function that is not visible, but will
become visible later?

I can't imagine any.

For what it's worth,

It may be nice if octave didn't halt until it tried to actually evaluate an invalid handle. I'm not saying it should try and repair handles but it could keep invalid handles around as invalid.

For example, the SPM/niftilib Matlab code appears to use bogus handles as a way of marking un-implemented features. They use "@crash" entries to mark some corner cases in a dispatch table. This is easy to work around by creating a crash function that crashes ;), but I don't know how common this sort of thinking is.

In this case they used "@crash" but a matlab coder could concievably get really fancy and name the undefined functions such that the error hints at which specific feature wasn't implemented.

--judd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]