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-08-01 04:22:42 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!freenix!newsfeed.rt.ru!rt.ru!image.surnet.ru!surnet.ru!carrier.kiev.ua!news.lucky.net!not-for-mail From: Oleg Goodyckov Newsgroups: comp.lang.ada Subject: Re: FAQ and string functions Date: Thu, 1 Aug 2002 14:09:09 +0300 Organization: unknown Distribution: world Message-ID: <20020801140909.I1080@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 1028200960 23042 193.193.193.102 (1 Aug 2002 11:22:40 GMT) X-Complaints-To: usenet@news.lucky.net NNTP-Posting-Date: Thu, 1 Aug 2002 11:22:40 +0000 (UTC) Keywords: 265282490 X-Return-Path: oleg@videoproject.kiev.ua Xref: archiver1.google.com comp.lang.ada:27562 Date: 2002-08-01T14:09:09+03:00 List-Id: On Wed, Jul 31, 2002 at 08:56:10PM +0000, Robert A Duff wrote: > Suppose I'm writing a long-lived application that does string fiddling. > Should I choose Ada (because it has good type checking and whatnot, > which helps make my code maintainable), or should I choose Perl, because > it has useful string fiddling ops available (*portably* available)? > It's annoying to have to make that choice, because the two issues are > orthogonal (there's no reason why a language can't be good in both > ways). Yes! > So I think the original poster's complaint is reasonable. The complaint > is, "X is not available"; the response, "well, you can write X yourself" > is not impressive. Yes! > To be honest, I would never choose Perl for *anything*, because I value > various "ilities" over having some useful operations available. > (I think Perl is an abomination.) But I can understand why some folks > make the opposite choice. O yes. > By the way, a partial answer to the original poster's question is to > look at the various GNAT packages, such as SNOBOL. I have no idea > whether they do what you want, but they do some kinds of string > manipulation. They may be compiler dependent, or they may be useful > with other compilers. Thanx. I've looked to that packages and have found a little. It is very interest (for me at least), how much from all abilities of string manipulation functions, written for Ada are really used? There are so many functions and procedures and different their variants... How many from them are using? This is rhythorical question. I'm not waiting answer. >From times of PL/1 I have stable abomination to string processing because using of SUBSTRING, INDEX etc. is true perversion. It is very hard to worki with. And enstead of it simple splitting string to list of tokens by one operator transforms string processing miraculous to usual work. For me it was very big surprize. I've found this simple trick solves most problems in most cases. For example, after splitting I have number of tokens in my string. In many cases it is very important information for diagnostic purposes and frequently is enough for making decision. Then I can subsequntly to split every string got on previous splitting and work independently from other contents of original string. This makes an algorythms more opaque and simple. The same work using of combinations of SUBSTRING and INDEX looks awfull.