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.4 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, 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-7-bit Received: by 10.204.152.217 with SMTP id h25mr395022bkw.3.1339692527379; Thu, 14 Jun 2012 09:48:47 -0700 (PDT) Path: e27ni47931bkw.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Practicalities of Ada for app development Date: Tue, 12 Jun 2012 20:04:35 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <89e137c8-45b1-48a3-8d15-3a15d8796af0@googlegroups.com> NNTP-Posting-Host: 96.2.54.122 Mime-Version: 1.0 X-Trace: posting.google.com 1339556676 17119 127.0.0.1 (13 Jun 2012 03:04:36 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 13 Jun 2012 03:04:36 +0000 (UTC) In-Reply-To: <89e137c8-45b1-48a3-8d15-3a15d8796af0@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=96.2.54.122; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-12T20:04:35-07:00 List-Id: On Tuesday, June 12, 2012 7:04:07 PM UTC-5, Adam Beneschan wrote: > On Tuesday, June 12, 2012 2:12:53 PM UTC-7, Nomen Nescio wrote: > > Adam Beneschan wrote: > > >=20 > > > there are existing libraries to do such things in Ada. I think > > > Vadim Godunko has a regular expression matcher > >=20 > > Any high-level language can be expanded with libraries. This > > capability doesn't offer a means to claim that the language itself is > > good for all problems. > >=20 > > One project might use Bob's String Parsing Machine (tm), while another > > project becomes dependant on Vadim's Regex Swiss Army Knife (tm). So > > you have the wheel reinvented in multiple styles, and developers who > > cannot count on homogeneous interfaces being available as they move > > from one project to the next. OTOH, you can count on developers to > > know the language. IOW, what would otherwise be common knowledge > > becomes tribal knowledge - knowledge that's lost with turnover. And > > libs that are not held to the same standards and verification as the > > compiler. >=20 > Maybe this should be a challenge to the Ada community to come up with som= e common package specification (or set of packages) that would be sufficien= t to meet those needs, so that users wouldn't feel a need to switch to Perl= to get the same kind of expressive power. Offhand, I don't think it would= need to become part of the official language standard (the letters I, S, a= nd O are not a magical incantation that automatically makes software more t= rustworthy). We've had working groups in the past that have developed stan= dard packages that weren't part of the language (although some of them beca= me part of later versions of the language, like Ada.Numerics). What does a= nyone else think? Does this seem worthwhile? I have to admit, I've someti= mes been frustrated when I need to work with text, although not enough to g= et me to use Perl for more than smallish programs, so off the top of my hea= d this seems like it might be useful. =20 >=20 > -- Adam Good idea. However, if it's a package devoted to text manipulation then we might want = to use ropes rather than strings [ http://en.wikipedia.org/wiki/Rope_%28com= puter_science%29 ] and provide a To_String ana To_Unbounded_String function= s. {I am assuming that it'll be a load-string, do-all-processing, store cyc= le with as few load/stores as possible.} If it's allowed in 2012 perhaps something like: GENERIC Use_Ropes : Boolean:=3D True PACKAGE Text_Possessing is --... END Text_Possessing; WITH Rope_Implementation, String_Implementation; PACKAGE BODY Text_Possessing is Use (if Use_Ropes then Rope_Implementation else String_Implementation); --... END Text_Possessing;