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,177ff20edf7f64cf X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Unconstrained array aggregation..sq. peg into round hole? Date: 1996/03/22 Message-ID: #1/1 X-Deja-AN: 143726941 references: <4ihrvo$hs5@dfw.dfw.net> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-03-22T00:00:00+00:00 List-Id: Robert Eachus said: " I never understood why, if this useful and used feature was in Ada 83 and Ada 95, you have to go through all this semantic sugar to create the ragged array type. To keep novice users from trying it?" it is not really a ragged array at all. If an implementation uses hidden heap pointers (very few implementations do in this case, e.g. the old Alsys technology, which sometimes uses hidden pointers, does not do so, and the last time I used RR it warned of storage leaks here), then all you have is an array of pointers, which is more easily declared directly. If the implementation allocates the maximum, fine, but that is not what people call a ragged array! THere is nothing odd about the syntax here, it is a natural combination of features. If novices don't undrstand it, they certainly should not be using it! As for allowing directly the notion of array of unconstrained array, this is no different from allowing e.g. X : String; in the first place. Although this has definable semantics, it represents a level of dynamic behavior that is inconsistent with the rest of the Ada design (in particular, this would definitely require hidden heap allocation, and probably only makes sense in a garbage collected regime).