On 5/28/05, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:
>
> ...
>
> Alternatively, one could use lists instead of ":" like this:
> 
>     {-option flag}
>     {-option oneof {a b c}}
> 
> This is more Tcl-like and allows you freedom in the variable name.
> Example:
> 
>    ns_proc connect {{-eightbit flag} {{-speed oneof {1200 2400 4800}}
> 4800} {port /dev/ttya}} {
>      # ...
>    }
> 
> ...
>
> What do you think?


I think it looks like 'flag' is the literal default value for the
-eightbit option.  I do like the idea of lists, it is more Tcl-like. 
But Tcl already has a syntax for procs, and this clashes with it.

To be compatible, the type specifier would have to be the third arg,
but then you couldn't specify the type without also specifying a
default.  I don't see a clean way to do it...

Reply via email to