octave-maintainers
[Top][All Lists]
Advanced

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

Re: help --list incorrect on stable


From: Mike Miller
Subject: Re: help --list incorrect on stable
Date: Tue, 17 Jan 2017 11:04:09 -0800
User-agent: NeoMutt/20161126 (1.7.1)

On Tue, Jan 17, 2017 at 10:11:47 -0800, Rik wrote:
> The issue is that the internal function __keywords__ does not include items
> like classdef, endmethods, etc.  I think there's a lot of cruft in help.cc
> at this point.  Is there any reason not to replace the call to __keywords__
> with iskeyword which returns a true list of what the parser knows?

As a data point, it seems extremely counterintuitive to me that
iskeyword() returns a list of keywords. But I see that is done for
Matlab compatibility. OTOH, I have found the __keywords__,
__operators__, and __builtins__ functions to be very useful.

Looking through Octave itself, I see only one place where iskeyword() is
used to return a list of keywords, and 5 places where __keywords__() is
used. So it seems that others agree.

> On the development branch, would there be any problem removing functions
> like __keywords__, __operators__ from C++ and making them m-files in
> scripts/help?  They just seem to return a cellstr and it would be easier if
> these were m-files.

I agree with deduplication like this where possible. I also wonder if it
might be a useful feature that these are built-in functions that are
available even if the load path is undefined.

What if both iskeyword and __keywords__ were refactored to call the same
library function defined in the parser? Such a function might also be
useful to users of the C++ API for embedding the Octave interpreter.

-- 
mike



reply via email to

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