|
From: Simon J. <sje...@bl...> - 2004-06-21 11:08:51
|
Rui Nuno Capela wrote: >[...] What about that all-upper-case restriction for command keywords? And the >parameter key names _must_ be capitalized or sort of. > My suggestion was that "key names _must_ not match keywords" be the only rule - its sufficient - and that key names be mixed case by convention, rather than by law. That would allow for the occasional upper-case name where it made sense, eg for acronyms (still use ALSA rather than Alsa). The keywords are all upper case because... thats just the way they are. Its not a rule exactly (or IMHO shouldn't be) its simply the convention that was chosen/adopted. (FWIW I don't particularly like the upper case keywords because 1) its less readable, 2) its less typeable, 3) there's no need to shout, and 4) it isn't 1976 any more. But its not my place to rework the protocol according to my personal tastes/prejudices, especially when I lurked my way through the first eight drafts and am not involved in the software at either end of the link. So I'm just offering what help I can to make the parser work at all). >Isn't it too restrictive? I'd rather have LSCP case insensitive al together. > There's not much advantage in making the protocol case insensitive. Its not like the software at either end is going to forget to press the shift key. More likely it would fail to match an oddly cased key name because someone forgot ToUpper(). OK, some people might need to type LSCP by hand, but with a consistent set of conventions it shouldn't be too hard for them to get it right. The disadvantages of case insensitivity are 1) extra work in the lexical analyser and 2) extra opportunity for name/keyword clashes: It would no longer be possible to use the key name "Channel" because it would now clash with the keyword "CHANNEL". >Again, putting my logs into the fire ;) > > Me too. And its not even my fire. Simon Jenkins (Bristol, UK). |