Comments on: Help for module list and beyond?
As more features of R3 become modules we will want an easy way to ask: what modules are installed?
A skilled REBOLer will know how to write:
foreach [name mod] system/modules [print trim spec-of mod]
but something more friendly (and shorter) would be handy.
Since the help function is our primary "gateway" to information, it seems like the best choice for enhancement.
For example, we could allow literal words to refer to categories:
would print out a list of the installed modules.
That method would also allow us to add:
and other such categories.
Although, it should be noted that it's also possible to allow:
However, I think experts see the problem with that method: it starts us down a path of mapping-out certain keywords in help (because normally, that line would give you help for the variable called modules.)
In the question posed at the top of the blog, you used the word 'what. I think WHAT is the better word to use for this and, while I'm at it, I'll suggest that the query spec should be a dialect.
I'd also like a way to use WHAT and HELP programatically.
WHAT seems like a good choice. It's already list-oriented and avoids the arg conflict we hit with HELP.
I'm ok with a query dialect, as long as simple is simple, such as allowing default cases like:
For your second point, WHAT and HELP themselves could just be thin wrappers into abstracted core functions that could be used programatically. I agree: quite useful for GUI's, IDE's, editors, web-sites, etc.
Post a Comment:
You can post a comment here. Keep it on-topic.