octave-maintainers
[Top][All Lists]
Advanced

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

Re: Deprecate nfields function?


From: John W. Eaton
Subject: Re: Deprecate nfields function?
Date: Sat, 01 Mar 2014 12:05:22 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9

On 03/01/2014 11:21 AM, Rik wrote:
3/1/14

All,

Would anyone be heartbroken  if we deprecated the nfields function in
version 4.2?  It is not used in any m-files in the core and I didn't even
realize it existed until I was trolling through the documentation.  nfields
returns the number of fieldnames in a structure and can be easily replaced
with 'numel (fieldnames (x))'.

My desire is motivated by trying to clean up and condense the global
namespace.  Using octave-stable, I can find the number of functions with

list = [__builtins__ ; __list_functions__ ];
numel (list)
1607

That is a lot of primary functions to remember exist and to avoid name
collisions with.

Matlab doesn't have this function so there is no compatibility hit.  Also,
they seem to have realized the error of their earlier ways in
differentiating functions by simply creating names.  They are now trying to
condense their namespace as well.  Instead of delaunay, delaunay3,
delaunayn they have gotten rid of delaunay3 and just have delaunay for 2-D
and 3-D and delaunayn for N-D.  Similarly, they used to have a lot of
different quadrature routines and now they are pushing just integral,
integral2, and integral3 which accept a 'method' argument to change the
internal algorithm.

These changes seem OK to me.

jwe




reply via email to

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