When would this be preferred over 'find-doc'?
--Chouser
find-doc searches both the name and docstring of all vars that
have docstrings, regardless if they hold functions or other
values. Is it that you want to include vars that have no
docstrings?
> - find-doc requires a search string; apropos first stringifies its
> argument -- (str kw) -- so you can search using
> numbers or symbols as well
Since neither is a macro you'd still need to quote a symbol. It
would be slightly more frictionless if there were a macro
version.
> - apropos returns a list, similar to (Chez) Scheme's apropos-list, so
> its result can be used for further processing
There's a tension here between providing data that can be
processed further vs. providing pleasantly-formatted data at the
REPL. I had noticed similar tension in repl-utils/show, where
returning a vector of all methods would have made it almost
useless by itself, and yet it's not uncommon to want a list of
methods for further processing.
I wonder if it would be reasonble to handle this by providing
custom print methods for these things, so that they would
actually *be* a list (or map or vector or whatever), but when the
REPL prints them they'd be all nicely formatted.
Does anyone else think they'd use apropos?
--Chouser