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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,935e1c7498010255,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-25 19:39:37 PST Path: pad-thai.cam.ov.com!bloom-beacon.mit.edu!news.starnet.net!wupost!howland.reston.ans.net!swrinde!hookup!olivea!charnel.ecst.csuchico.edu!csusac!csus.edu!csulb.edu!library.ucla.edu!news.mic.ucla.edu!news.lmu.edu!eecs2.LMU.edu!RTOAL From: RTOAL@lmumail.lmu.edu (Ray Toal) Newsgroups: comp.lang.ada Subject: Strings Date: Wed, 25 Jan 1995 15:08:45 Organization: Loyola Marymount University Distribution: world Message-ID: NNTP-Posting-Host: eecs2.lmu.edu X-Newsreader: Trumpet for Windows [Version 1.0 Rev Final Beta #6] Date: 1995-01-25T15:08:45+00:00 List-Id: I was impressed by Robert Firth's note in response to the claim made by a previous poster who claimed *p++ = *q++ is more readable than loop P(I_ := Q(I); I := I + 1; ... Rober said a real Ada programmer would write P := Q; True! Touche! Ada is more terse and more readable than C on this one! To be fair to the C folks, C++ now features a "language-defined" string class, so one string can be assigned to another with "=": s1 = s2; My concern is with many in the C "culture" who would probably avoid the use of this class and stick with "char*"s, on account of some probable (real or imagined) loss of efficiency. The vastly improved clarity of program text that deals with complex objects as single entities (as opposed to constantly fiddling with their internals) is a strong point of Ada and a reason why Ada programs are more readable and far less error prone. At least the C++ "committee" is realizing this. Perhaps some day we can look forward to a **real** array class. But of course, in C++, if you WANT safe arrays or safe pointers, you can always code them yourself. My preference is to have safety by default, as in Ada, and be specific when I need Unchecked things. Ray Toal