On 5/26/05, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:
> 
> Ah. Good tip. What I was also looking is the usage of "?" in the
> specstring (never understood this one).


The '?' signifies an optional argument, but it's used in the C API
only.  Tcl already has defaults, which is effectively an optional
argument.  Having the programmer explicitly handle optional args when
using the C API is faster and more natural, I think.

All that's surfaced in the Tcl API so far is options and the end of
options marker.  Args, defaults and the 'args' list is also
implemented, but of course that's standard Tcl behaviour.

Where we left the discussion last time is how to deal with type
checking.  Boolean switches and range values are basically just forms
of type checking.

Depending on how type checking is implemented, then the syntax of an
arg specification may change.  You may or may not end up pulling your
hair out later if you change all your code to use ns_proc now...  :-)

Reply via email to