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.1 required=5.0 tests=BAYES_00,DATE_IN_PAST_12_24, FORGED_GMAIL_RCVD,FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d5b211b0c1ffcf3e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.204.143.145 with SMTP id v17mr404896bku.7.1339693642142; Thu, 14 Jun 2012 10:07:22 -0700 (PDT) Path: e27ni47991bkw.0!nntp.google.com!news1.google.com!postnews.google.com!oe8g2000pbb.googlegroups.com!not-for-mail From: quiet_lad Newsgroups: comp.lang.ada Subject: Re: Practicalities of Ada for app development Date: Wed, 13 Jun 2012 21:18:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <79c5c9f7-4b72-4990-8961-b3e2db4db79b@qz1g2000pbc.googlegroups.com> <98ef69fe-f5af-485b-89b2-9358059f4582@googlegroups.com> <92d44fa9-03ac-4f3a-84ba-4c73bf59392b@re7g2000pbc.googlegroups.com> NNTP-Posting-Host: 173.60.202.188 Mime-Version: 1.0 X-Trace: posting.google.com 1339647534 17094 127.0.0.1 (14 Jun 2012 04:18:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 14 Jun 2012 04:18:54 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: oe8g2000pbb.googlegroups.com; posting-host=173.60.202.188; posting-account=P7XY3woAAADWVZ3Q8yfcXP4_h9XhQ8Kj User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.80 (X11; FreeBSD 9.0-RELEASE amd64; U; en) Presto/2.10.229 Version/11.60,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-13T21:18:53-07:00 List-Id: On Jun 13, 5:57=A0am, Maciej Sobczak wrote: > On 13 Cze, 12:31, quiet_lad wrote: > > > How handle the strings without regex? > > I see you insist very much on having support for regexps, but there is > something that bothers me about the way they are typically > implemented. > Programs that use regexps *usually* have them coded statically. The > run-time loading of regexp patterns is very rare. The problem with > static patterns is that they are anyway processed at run-time (they > are somehow analyzed at runtime and some internal representation is > *dynamically* created in memory that later helps in processing the > subject strings), meaning that every time the program is run, the same > "statically" coded pattern has to be analyzed and the structure has to > be constructed from scratch. That is, there is some conceptual > mismatch and potentially lost optimization opportunity, due to the > fact that we go from something that is known statically to something > that has a run-time nature. This is just counterproductive. > > I would rather ask about an external tool that can take my regexp > pattern and generate the *static* code structure that processes input > strings accordingly. Such a generated code can be then included in the > final application just like IDL-generated serializers are used. The > advanta of such approach is that there is no tradeoff between regexp > analysis speed vs. string processing speed and there is no time wasted > on analyzing the same pattern many times. > > In short: in a typical application (whether this is web service or > something else) you don't need regexp support in the language; you > need regexp processor code generator. > > -- > Maciej Sobczak *http://www.msobczak.com*http://www.inspirel.com I do not insist. I just see regex used and am amazed there is alternative. I am also glad there is one.