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,c890e6ab3fb2c5fc X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,c890e6ab3fb2c5fc X-Google-Attributes: gid109fba,public X-Google-ArrivalTime: 1995-01-30 06:23:52 PST Path: swrinde!howland.reston.ans.net!agate!blanket.mitre.org!linus.mitre.org!spectre!emery From: emery@goldfinger.mitre.org (David Emery) Newsgroups: comp.lang.ada,comp.lang.c++ Subject: Re: ADA Objects Help! Date: 30 Jan 1995 14:13:09 GMT Organization: The Mitre Corp., Bedford, MA. Message-ID: References: <3f9g1u$j4m@nps.navy.mil> <3fu6qc$pc5@gnat.cs.nyu.edu> <3g3uc0$hm6@watnews1.watson.ibm.com> <3g49bu$7fv@nps.navy.mil> NNTP-Posting-Host: goldfinger.mitre.org In-reply-to: milod@netcom.com's message of Sat, 28 Jan 1995 21:46:32 GMT Xref: swrinde comp.lang.ada:25905 comp.lang.c++:110956 Date: 1995-01-30T14:13:09+00:00 List-Id: >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); In this example, the 'robot' is an active entity. Therefore the "appropriate" Ada abstraction is: task robot is entry Mow (location : large_grassy_space); end robot; and we end up with (surprise!): robot.mow (lawn); dave -- --The preceeding opinions do not necessarily reflect the opinions of --The MITRE Corporation or its sponsors. -- "A good plan violently executed -NOW- is better than a perfect plan -- next week" George Patton -- "Any damn fool can write a plan. It's the execution that gets you -- all screwed up" James Hollingsworth -------------------------------------------------------------------------