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 02:58:37 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!fu-berlin.de!uni-berlin.de!dialin-145-254-036-246.arcor-ip.NET!not-for-mail From: Dmitry A.Kazakov Newsgroups: comp.lang.ada Subject: Re: FAQ and string functions Date: Thu, 1 Aug 2002 00:04:38 +0200 Message-ID: References: <20020730093206.A8550@videoproject.kiev.ua> <4519e058.0207300548.15eeb65c@posting.google.com> <20020731104643.C1083@videoproject.kiev.ua> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-036-246.arcor-ip.net (145.254.36.246) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1028109516 35810554 145.254.36.246 (16 [77047]) User-Agent: KNode/0.4 Xref: archiver1.google.com comp.lang.ada:27512 Date: 2002-08-01T00:04:38+02:00 List-Id: 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. > 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? > So, by all of diversity of GENERIC string's handling tools in Ada, > convinient tool is not present. Maybe because is not so awful convinient? (:-)) -- Regards, Dmitry Kazakov www.dmitry-kazakov.de