octave-maintainers
[Top][All Lists]
Advanced

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

Re: File extensions in __list_functions__


From: Søren Hauberg
Subject: Re: File extensions in __list_functions__
Date: Tue, 26 May 2009 18:03:11 +0200

tir, 26 05 2009 kl. 11:41 -0400, skrev John W. Eaton:
> OK.  Currently, __list_functions__ (DIR) is just calling 
> 
>   string_vector fl = load_path::files (dir);
> 
> so it gets a list of all files, not just .m, .oct, and .mex files.
> Maybe we need a
> 
>   load_path::fcn_names (DIR)
> 
> function that returns the names of the functions defined in a
> particular directory, regardless of whether DIR is actually in the
> load path.  This function would just be in the load_path class becuase
> it seems to be a related function.
> 
> I'll add this function and fix __list_functions__ (DIR) unless you
> object.

I think this sounds like a very good solution.

> | > It might also be good to have a data structure that would allow us to
> | > easily produce diagnostics about functions that have multiple
> | > definitions.
> | 
> | I guess that could be helpful for debugging, though I don't think I've
> | ever needed this.
> 
> I think it might be helpful for Octave to provide this kind of warning
> by default to help avoid confusion when a package overloads some
> existing function.  Perhaps it could be limited to overloading of core
> functions?

Ahh yes, that would be really nice to have. I'm not sure it would need
to be limited to core functions, though.

Soren



reply via email to

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