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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham 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,UTF8 Received: by 10.204.149.210 with SMTP id u18mr2597016bkv.1.1339300009964; Sat, 09 Jun 2012 20:46:49 -0700 (PDT) Path: e27ni33502bkw.0!nntp.google.com!news1.google.com!news2.google.com!news.glorb.com!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Practicalities of Ada for app development Date: Sun, 10 Jun 2012 05:46:48 +0200 Organization: Ada @ Home Message-ID: References: <79c5c9f7-4b72-4990-8961-b3e2db4db79b@qz1g2000pbc.googlegroups.com> NNTP-Posting-Host: YXt0v2lA6W9DOfYYDozFfg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.00 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-06-10T05:46:48+02:00 List-Id: Le Sat, 09 Jun 2012 11:36:13 +0200, Dmitry A. Kazakov = a =C3=A9crit: > On Sat, 9 Jun 2012 11:25:05 +0200 (CEST), Nomen Nescio wrote: > >> wrp wrote: >>> >>> I develop small to medium sized tools. Tasks are mostly limited to >>> text processing, database management, and simple visualization. >> >> Ada is lousy for text/string manipulation. > > Which is good, because there practically is no task, which required te= xt > string manipulation. You should parse strings in place without moving > anything except the cursor. The same applies to the formatted output. I have to agree a lot. That's what I did with a Pascal variant too (did = = not knew Ada at that time, and still not ported to Ada), for a set of = applications running a lot of text processing (CGI). I avoided passing = strings everywhere, using references to strings and string ranges, movin= g = start and end cursors, etc. Passing strings is nice for modeling, but is better avoided when the mod= el = is OK. For another application which was more generating new text than parsing = = existing text, I also had a strategy using call=E2=80=91back procedures = to print = =E2=80=9Cthis and that=E2=80=9D instead of passing strings to a procedur= e dedicated to = printing (you pass references to subprograms instead of passing strings)= . = However, depending of the context, passing tagged types or else = association of a subprogram and a record, may be a better choice. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity