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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1042f393323e22da X-Google-Attributes: gid103376,public From: NKSW39B@prodigy.com (Matthew Givens) Subject: Re: Any research putting c above ada? Date: 1997/04/20 Message-ID: <5jddr6$mqm@newssvr01-int.news.prodigy.com>#1/1 X-Deja-AN: 236156193 Distribution: world References: <5ih6i9$oct$1@waldorf.csc.calpoly.edu> <5ijb0o$ajc@ns1.sw-eng.falls-church.va.us> <334d3da5.14386594@aplcen.apl.jhu.edu> <2senchydgk.fsf@hpodid2.eurocontrol.fr> <5im3an$3dv@bcrkh13.bnr.ca> <33526cbf.41c6@cca.rockwell.com> <5iusvd$118e@newssvr01-int.news.prodigy.com> <33530e22.5940@worldnet.att.net> <5j18h3$1564@newssvr01-int.news.prodigy.com> <5j8ukr$lu9@nntpa.cb.lucent.com> Organization: Prodigy Services Company 1-800-PRODIGY Newsgroups: comp.lang.ada Date: 1997-04-20T00:00:00+00:00 List-Id: ka@socrates.hr.lucent.com (Kenneth Almquist) wrote: > > >Not a terribly convincing example, from my perspective. First, there >is rarely reason to do this. C and Ada provide library routines for >case conversion. Calling them is "simple and easy," and they handle >the local character set, so that code which uses them is portable to the >systems using different character sets. Of course it's not convincing. It was intended to be an example of data mixing with a purpose. It was the first one that sprang to mind, so I used it. >Second, the Ada equivalent to your example is not that complex: > > Character'val(Character'pos('A') + 32) Yes, I know, but why take extra effort to "code around" something, then call that a benefit? >This is more verbose because of the conversions, but the conversions >provide a clue to anyone who has to port the code. If you are writing >throw-away code, sticking in the conversions is no big deal. If the >code you are writing is going to have to be maintained years from now >(either by you or someone else) it is probably worth making the dependency >on the character set a little more conspicuous than the C code does. And if adding explicit type conversions to that simple example is going to make it easier to maintain, then you are employing the wrong programmers. > Kenneth Almquist - If at first you don't succeed, destroy all evidence that you ever tried. << Iceman >>