From ... From: Erik Naggum Subject: Re: argc ("-handling -multiple -args -that -look -like -1 -arg") Date: 2000/06/25 Message-ID: <3170917784127386@naggum.no>#1/1 X-Deja-AN: 638711638 References: <8j3o5m$2eqi7$1@fido.engr.sgi.com> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 961931242 25728 195.0.192.66 (25 Jun 2000 11:07:22 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://www.naggum.no User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6 Mime-Version: 1.0 NNTP-Posting-Date: 25 Jun 2000 11:07:22 GMT Newsgroups: comp.lang.lisp * Clayton Weaver | I will finish with the opinion that nitpicking the corner cases | where it can do the wrong thing does not change the benefit of | splitting command arguments with embedded field separators in them | to see if they make sense as discrete command options in the average | case. If there are security implications, then deal with those for | those arguments with security issues in whatever way is appropriate. This could have been fine if there were only a fixed set of field separators. There aren't. The shell user/programmer may set the internal field separators (shell variable IFS) to whatever he wants precisely to avoid parsing problems with random user input. IFS does not have to be exported to the environment, so there's no telling what the internal field separators were. | Anyone who suspects that their command line option parser will not | be able to disambiguate multiple options in a single argument string | from persistent storage object names with embedded field separators | often enough for the code to do that to be worth the effort of | designing that functionality into their program is free to not | implement it. Oh, great! Let's have all programs differ in the way they do this! My conclusion: Beware of people who speak of the "average case" or "often enough" when designing user or programming interfaces. #:Erik -- If this is not what you expected, please alter your expectations.