octave-maintainers
[Top][All Lists]
Advanced

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

Renaming oct-obj?


From: Rik
Subject: Renaming oct-obj?
Date: Thu, 17 Dec 2015 17:20:22 -0800

12/17/15

jwe,

After spending a lot of time with octave_value_list in the code lately, I'm
wondering why this class is located in libinterp/corefcn/oct-obj.h?  It
would seem more natural if it was called ovl.h in analogy with ov.h.  And I
would naturally go looking for it in the octave-value directory, rather
than the corefcn directory.  I have a changeset that implements these two
ideas unless you see a problem with it.

Also, I think it would be a good idea to add an instance of ovl() which
takes no arguments and returns an empty octave_value_list.  There are a
number of functions, for example in graphics.cc, which don't return
anything.  Because they are defined with the DEFUN macro they are required
to return something.  Right now they often use this style

octave_value_list retval;
...
...
return retval;

But this could all be made much simpler and clearer with

return ovl ();

For the time being I have been writing

return octave_value_list ();

but that is pretty long.

--Rik



reply via email to

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