Hello, I want to discuss doubly quoted words. As you know, words quoted inside of "" aren't a special case in the parser, they're just literal "s embedded inside strings.
However, that introduces several deficencies present only by virtue of having dwords. No /fe and /for, nor any word-related function except numwords() are safe for unvalidated data. One might say that these aren't safe for unvalidated data, but is there any other use for them? Iterating strings hardcoded in the script? If you, for instance, store channel ban lists in a word list and a ban starts with a `"' (i.e. "[EMAIL PROTECTED]) and another one ends with a `"', too, when iterating words in the list with /fe or word(), you'll get an element that contains more than one word. Same goes for Tab completion. $numwords() doesn't honor doubly quoted words while word() et al honor them. There are possibly many other situations where dwords aren't expected and will cause surprises to unsuspecting scripters. My proposals (mutually exclusive): a) Remove dwords from builtin functions and commands completely. This will set the end of dword pestilence (aka "quoting hell"), but will make some people unhappy. I counter by saying that there are other methods for storing multiword data (e.g. structures, karll's arrays), but in the current state, dwords, being an edge case, cause word functions to be unusable. b) Introduce a way for a function or a command to not honor them at all, nested functions inheriting this property. For example: /`fe (foo "fine dword" bar) i { echo $i; }; yielding: "fine dword" bar As opposed to: /fe (foo "fine dword" bar) i { echo $i; }; yielding: "fine dword" bar I recommend the ` character, as it isn't used as an operator in the Expression Mode. Objections? Consent? - nullie _______________________________________________ List mailing list List@epicsol.org http://epicsol.org/mailman/listinfo/list