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.1 required=5.0 tests=BAYES_40,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!ucbvax!JPL-VLSI.ARPA!larry From: larry@JPL-VLSI.ARPA.UUCP Newsgroups: comp.lang.ada Subject: (Second try) Query: other ways to implement encapsulated objects Message-ID: <870326230107.03d@Jpl-VLSI.ARPA> Date: Fri, 27-Mar-87 02:01:07 EST Article-I.D.: Jpl-VLSI.870326230107.03d Posted: Fri Mar 27 02:01:07 1987 Date-Received: Thu, 2-Apr-87 00:35:58 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet List-Id: > Could you please send posts about C++ [to C++ groups] ... Quite right; long msgs on other languages should go elsewhere. But it is proper to point out that some of the most important features of Ada--those supporting SW engineering--are being added to other languages used for production (not experimental) programming. The proposed ForTran 88 includes several additions that could have been inspired by Ada. ---------------------------------------- I've been wondering how many different ways in Ada there are to implement encapsulated objects. One alternative to the "standard" way is use records containing tasks or (if the Ada standard is extended) subprograms: type BOATS is record COLOR: ... ; LATITUDE: ... ; LONGITUDE: ... ; DIRECTION: ... ; Drive: Task_type_Move; Paint: Subprogram_type_Color; end record; BOAT: array (MINE..YOURS) of BOATS; begin --All BOATS are launched when tasks are activated? --Does each reference to data items BOAT( MINE ) through BOAT( YOURS ) --also perform an action? Are there any benefits of this approach that would outweigh the problems? Larry @ jpl-vlsi.arpa