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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f316de357ae35e9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-31 15:57:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!carrier.kiev.ua!news.lucky.net!not-for-mail From: Oleg Goodyckov Newsgroups: comp.lang.ada Subject: Re: FAQ and string functions Date: Wed, 31 Jul 2002 18:23:08 +0300 Organization: unknown Distribution: world Message-ID: <20020731182308.K1083@videoproject.kiev.ua> References: <20020730093206.A8550@videoproject.kiev.ua> <4519e058.0207300548.15eeb65c@posting.google.com> <20020731104643.C1083@videoproject.kiev.ua> Reply-To: og@videoproject.kiev.ua NNTP-Posting-Host: news.lucky.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.lucky.net 1028156218 2582 193.193.193.102 (31 Jul 2002 22:56:58 GMT) X-Complaints-To: usenet@news.lucky.net NNTP-Posting-Date: Wed, 31 Jul 2002 22:56:58 +0000 (UTC) Keywords: 265282490 X-Return-Path: oleg@videoproject.kiev.ua Xref: archiver1.google.com comp.lang.ada:27547 Date: 2002-07-31T18:23:08+03:00 List-Id: On Thu, Aug 01, 2002 at 12:04:38AM +0200, Dmitry A.Kazakov wrote: > Oleg Goodyckov wrote: > > > If we look at that Ada program carefully, we'll see, that half of it takes > > subprogram Get_Next_Word. What it does? It's clear from name - it parses > > next word from line. How it is done in Perl program? Simple - by splitting > > of line on words by space as delimiter. So, while on Ada we must make > > slice, "Array_Name(5..8)", loop, if, and other very important stuff, in > > Perl we say @list=split(/ /,String) and that's all. Is this Perl's own > > especiality? No. It can be realized in Ada. And I say more - without this > > Ada will never be convinient language. > > For which use? I would definitely not use something like split for parsing. > It is extremely inefficient. Ada was not designed for write-once-use-once > programs. Ok! How about write-once-use-always? For text data analyze applications. > > While for splitting string like > > "x=2*3" people will must be to write program enstead split("=","x=2*3"), > > people will write in Perl, not Ada. > > And what would you do in the case "x=/* An error, should be := */ 2*" and > "3" continues on the next line? Nothing. I know: I have data as described. If no - data is corrupted and must be throwed out. It's simple. But what would you do in the case, when data is correct yet? You'll build PROGRAMMMM, instead write "split(/=/,"x=2*3")".