[Opensim-dev] Organization and naming patterns of commands on the console

Dalien Talbot dalienta at gmail.com
Thu Feb 5 01:21:29 UTC 2009


On Wed, Feb 4, 2009 at 9:50 PM, Justin Clark-Casey <jjustincc at googlemail.com
> wrote:

> Any thoughts on this?  Just kind of thinking about it at this stage - part
> of me prefers typing things like "show users"
> or "help terrain" while another part of my mind likes the 'tidiness' of
> prefixing every module command with the same
> word (e.g. terrain fill or region oar load).


I think it depends on what kinds of evils to choose :)

using the first keyword to select the handler to throw the remainder of the
string to, is a very nice decoupled approach from the code perspective, and
is the most flexible and simple (the analogy is argc/argv passing from the
shell, the first token being the executable int the path). The obvious
downsides, that the standardization ends immediately beyond the first level
:-)

the standardization "by action" is more convenient at least to some part of
the users. will require some more code indeed, also.

the "embedded standard" solution would be a full-blown parser with
contextual "?"-help - then the modules can use the benefits of grouping by
action without scattering the code too much - as they'd register the
callbacks from the parser tree. As well then the token
representation/quoting/escaping/etc. could be standard and uniform. But
that's the most code-heavy approach and my guess is you're not really
looking forward to that at all :)

/d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20090205/3b217f0a/attachment-0001.html>


More information about the Opensim-dev mailing list