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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e0afec3ed133afd9,start X-Google-Attributes: gid103376,public From: JR Crosmer Subject: Enumerations and Arrays Unnecessary!??? Date: 1997/06/13 Message-ID: <33A16AC0.1BA4@calvin.cca.rockwell.com>#1/1 X-Deja-AN: 248155226 Organization: Collins AT&E Newsgroups: comp.lang.ada Date: 1997-06-13T00:00:00+00:00 List-Id: In the past six months I have a course in object oriented design and another one in object oreinted design (5-days each) . In each course the instructor insisted rather stronly that "There is no need for enumeration types or array types." Neither instructor had any familiarity with Ada83 or Ada95. They each suggested that an enumeration litteral be thought of as an object: e.g., send a message to the color Red to do something. Thay also insisted that in any situations in which an array is used, the implementation is not a good fit to the underlying problem. In my experience, I would be very hard pressed to give up either enumerations or arrays, especially with the capabilities allowed and enhanced with Ada attributes and data typing rules. In contrast, in C, C++ or Java, enumerations have almost no capability since they are treated mostly as named integers w/respect to name space and type compatibility. In particular, these languages are especially barren when trying to code a situation such as this one: type Color_Type is (Red, Green, Blue); type Color_Vector_Type is array (Color_Type) of ...some-element-type....; Any thoughts from other Ada, C++ or Jave programmers? JR Crosmer