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-Thread: 103376,d5b211b0c1ffcf3e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.196.232 with SMTP id ip8mr5933966pbc.6.1339357658165; Sun, 10 Jun 2012 12:47:38 -0700 (PDT) Path: l9ni38487pbj.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Practicalities of Ada for app development Date: Sun, 10 Jun 2012 21:47:37 +0200 Organization: cbb software GmbH Message-ID: <1q346u53zhu10.p16uyzeau73b.dlg@40tude.net> References: <79c5c9f7-4b72-4990-8961-b3e2db4db79b@qz1g2000pbc.googlegroups.com> <98ef69fe-f5af-485b-89b2-9358059f4582@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 4RFYTQ6jM/dAKFJoI0fUkg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2012-06-10T21:47:37+02:00 List-Id: On Sun, 10 Jun 2012 19:04:02 +0200, Yannick Duch�ne (Hibou57) wrote: > Le Sun, 10 Jun 2012 17:49:40 +0200, Shark8 a > �crit: >> Ironically, most of them aren't used in the mainstream of software >> development which tends to fall back on C's string manipulation [style >> of] functions or Regex (which is horrible if you look at Regex from a >> maintenance perspective.). > > If Regular Expressions appears as is, as literals in the program, yes, > that's a maintenance nightmare. But you may decompose the expressions, > build them incrementally (I use to do it with Python), or even fork to > something similar which could use objects and structures instead of > unreadable literal expressions (I don't one, just an idea). That does not change the fact that SNOBOL patterns are far more powerful (the language generated is of a much wider class), much more readable. The problems are that any patterns are unmaintainable unless trivial. Trivial patterns require no special means. Another problem is not in having pattern as an object. This is well possible in Ada. The actual problem is to have a pattern matching construct in the language. You need something like match Variable in Stream by Pattern do ... end match; which would initialize Variable or set of variables by matched parts of the Pattern while advancing Stream while the pattern is matched. It is very difficult to describe in a structured manner. The way SNOBOL handles that is total mess. Variables are specified in the pattern. Success and failure are just labels etc. It is not worth the efforts to bother about that, because, as I said, patterns is a bad idea in general. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de