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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d57302f2954365e1 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Question about base types Date: 1997/02/08 Message-ID: #1/1 X-Deja-AN: 217533989 references: organization: New York University newsgroups: comp.lang.ada Date: 1997-02-08T00:00:00+00:00 List-Id: Bob Duff said "Good question. This terminology is pretty messed up in Ada. Ada 95 cleans it up a little bit, but it's still pretty awful. Sigh." I actually do not agree that Ada 95 cleans it up. Yes, I know the terminology in Ada 95 is more consistent, but it is also more at odds with normal usage. The use of subtype for what everyone thinks of as a type causes all sorts of confusion. For example, in Ada 95, Integer is a subtype, and so is Integer'Base. Yes, it is true that Ada 83 was a little confused in this area, but the terminology chosen in Ada 95 is fundamentally confusing, and in fact I note a couple of error messages in GNAT that are absolutely correct but which always cause people trouble: package x is .... -- oops forgot this hid "type" x q : x; | Error: subtype name expected Almost all programmers react to this message thinking, "why do I need a subtype here, a type should be good enough" The fact that type x is ... introduces the subtype x is bound to be confusing. Sometimes we just decide to use the obvious terminology in GNAT instead of the technically correct termiology, and we probably should do that here too -- the message "type name expected would be much clearer in this instance. For example subtype x is integer range 1 .. 10; for x'size use 5; GNAT says "rep clause cannot be given for subtype" which is I think clear to people (at least no one ever asked for an explanation of this message). More accurate would be to say "rep clause may only be given for first named subtype" but this seems more confusing to us. As Bob said, a bit of a mess, and as I say, in my opinion, definitely NOT improved in Ada 95 -- I preferred the Ada 83 terminology here (actually there are a number of instances where Ada 95 has changed Ada 83 terminology that I think are ill-advised and cause confusion, but this is the most noticable of them).