From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,782af4edeb84c4b7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!news-zh.switch.ch!switch.ch!news.ip-plus.net!newsfeed.ip-plus.net!news.post.ch!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: basic basic ada question Date: Mon, 30 Oct 2006 12:46:59 +0100 Organization: Swisscom IP+ (post doesn't reflect views of Swisscom) Message-ID: <4545e633$1@news.post.ch> References: <1161268231.345231.242170@m73g2000cwd.googlegroups.com> <4537bc65_1@newsfeed.slurp.net> <1jn310yr05w2m.16eg50ahksb2h$.dlg@40tude.net> NNTP-Posting-Host: 194.41.146.1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: atlas.ip-plus.net 1162208822 20228 194.41.146.1 (30 Oct 2006 11:47:02 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Mon, 30 Oct 2006 11:47:02 +0000 (UTC) User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) In-Reply-To: <1jn310yr05w2m.16eg50ahksb2h$.dlg@40tude.net> X-Original-NNTP-Posting-Host: w01iwt.pnet.ch X-Original-Trace: 30 Oct 2006 12:46:59 +0200, w01iwt.pnet.ch Xref: g2news2.google.com comp.lang.ada:7274 Date: 2006-10-30T12:46:59+01:00 List-Id: Dmitry A. Kazakov schrieb: > On Sat, 21 Oct 2006 13:32:45 -0400, Robert A Duff wrote: > >> "Dmitry A. Kazakov" writes: >> >>> Well, this is a more general issue than just command line arguments. As for >>> me I consider the very idea of tokenizing as harmful. It is unfortunate >>> that both C and Ada follow a wrong concept in the command line interface. >>> Tokenizing is just wasting resources. It is also useless when you have >>> delimiters other than spaces, keyed arguments, or some nested structure. I >>> prefer always to parse the original source: the command line as a whole. I >>> never copy anything. >> How? On many operating systems, the "shell" or whatever will do all >> kinds of command-line parsing before you can get your hands on it. On >> Unix, it even expands wildcards (a rather bad design, IMHO). > > Surely depends on OS. In Windows there is GetCommandLine. > > I didn't criticise design of Ada.Command_Line, rather I did the idea of > tokenizing, when the programmer acts like a hamster storing things here and > there. Most of them he will never find again. I don't know whether > "hamster" programming stems from UNIX or just influenced it. (:-)) > > As for Ada.Command_Line, it could provide function Command return String; > with a remark that depending on the OS its result might be not very > authentic. [Neither Argument's result is.] function Command return Wide_String; function Command return Wide_Wide_String; Martin