From: Zoran V. <zv...@ar...> - 2005-05-27 15:37:05
|
Am 27.05.2005 um 11:34 schrieb Stephen Deasey: > 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. Hmm.... what I understood here was data-type checking as in integer/string type of thing. Under boolean support, I actually ment *absence* or *existence* of the option. I do not know how I could achieve this now, unless I say: ns_parseargs {{-boolean 0} args} but this is also half-baked. OK, lets think about type-checking. I would definitely say that boolean type-checking (as described above) should be in. The same for option-lists. Those two are most commonly found and needed. Other type of checking would not be needed. So, if I say: ns_parseargs {-a args} then anything what is given to "-a" should be accepted as is. Something like "string is ..." checking should be left to the programmer. I believe that underlying C-api already does the above, or? > > 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... :-) > Right. Lets fix this now. We can talk about the syntax when/if we agree on the scope of the implemented type-checking (as above). Deal? Zoran |