Am 28.05.2005 um 15:50 schrieb Stephen Deasey:


Here is how:

     ns_parseargs {{{-eightbit flag}} {-foo flag} args}



Ouch!

:-)

It will confuse people who read the code, don't you think?


I do but I do not care.



I think you're optimising for the wrong thing... :-(

Well... trying to keep the {option value} format
and introducing more options...

One can also use the

   -option:type

but this will save you just one list level if you want
to be Tcl-proc compatible.

OTOH, if you *do not* expect the 100% compatilibity with
the Tcl proc, then other possiblities open, of course.
So:
    ns_proc {
             -retries  {default 4 type int}
             -eightbit {type flag}
             -speed    {default 2400 type {oneof {1200 2400 4800}}}
             devpath   {default /dev/ttya}
            } {
       #....
   }

Ouch?

The thing is: we'd like to force a large foot into a small shoe!
This will not go without cutting the toes or drilling the hole
in the shoe :-)
When I look this from another perspective: the best way would
be to go and buy larger shoes!
Or, to quote some american indian: when you discover you're
riding a dead horse the best strategy is to dismount.

So what's from above: cut toes, drill holes, buy shoes or dismount ??

Zoran



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg- q22005
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel



Reply via email to