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: 109fba,c890e6ab3fb2c5fc X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,c890e6ab3fb2c5fc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-28 14:14:08 PST Newsgroups: comp.lang.ada,comp.lang.c++ Path: swrinde!howland.reston.ans.net!ix.netcom.com!netcom.com!milod From: milod@netcom.com (John DiCamillo) Subject: Re: ADA Objects Help! Message-ID: Organization: NETCOM On-line Communication Services (408 261-4700 guest) References: <3f9g1u$j4m@nps.navy.mil> <3fu6qc$pc5@gnat.cs.nyu.edu> <3g3uc0$hm6@watnews1.watson.ibm.com> <3g49bu$7fv@nps.navy.mil> Date: Sat, 28 Jan 1995 21:46:32 GMT Xref: swrinde comp.lang.ada:25848 comp.lang.c++:110772 Date: 1995-01-28T21:46:32+00:00 List-Id: ka@socrates.hr.att.com (Kenneth Almquist) writes: >swdecato@cs.nps.navy.mil wrote: >> Many Ada folks have demonstrated how Ada objects are created and deleted. >> My argument against the Ada style was that I felt that the C++ syntax more >> accurately modelled the englist language. >I don't know about you, but when I issue a command in English I place the >verb before the noun, as in "Mow the lawn." This translates naturally to >the C or Ada code: > mow(lawn); >The C++ alternative, > lawn->mow(); >is backwards. Actually, your example is backwards. An imperative in English has an implicit subject (usually 'you', that is, the person being commanded) and an explicit object (in this case, 'lawn'). So the Ada code would be: mow(robot, lawn); and the C++ would be: robot.mow(lawn); >Not to make too big a deal about this--either order (noun before verb or >verb before noun) is readable once you get used to it. I doubt that one >order is inherently "better" than the other. Agreed. >However, using both orders >in the same program seems like a bad idea if you are concerned about >readability. Oh, no. Here I must disagree. The two syntaxes (in C++) represent operations with different properties, so having a single syntax is potentially confusing. Note: I don't believe that the amount of confusion in either case is significant, but I am satisfied with the C++ (and Eiffel, and Smalltalk, and...) syntax. > Kenneth Almquist -- ciao, milo ================================================================ John DiCamillo Pinin' for the fjords? milod@netcom.com What kind of talk is that?