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,eda0a7cd6069ee4 X-Google-Attributes: gid103376,public From: wf@dcs.gla.ac.uk (Bill Findlay) Subject: Re: Type mess in Ada standard library Date: 1999/07/22 Message-ID: #1/1 X-Deja-AN: 504090238 References: <7n1uu4$so8$1@pegasus.csx.cam.ac.uk> <7n32tt$cio$1@nnrp1.deja.com> <7n41v3$j6$1@pegasus.csx.cam.ac.uk> <7n5cp9$89b$1@nnrp1.deja.com> Organization: The University of Glasgow Newsgroups: comp.lang.ada Date: 1999-07-22T00:00:00+00:00 List-Id: In article <7n5cp9$89b$1@nnrp1.deja.com>, Robert Dewar wrote: > > |> typ'Anonymous_Access > > Just to be clear I would ONLY allow this in subprogram formals, > and I would be quite happy to restrict it to those which had > foreign conventions, otherwise I am afraid it would be horribly > overused. > ... > > Would it at the same time also be possible to add anonymous > > arrays? > > > > typ'Array(0..255,0..255) -- anonymous 64k 2D array of typ > > typ'Array(<>,<>,<>) -- any 3D array of typ > > In fact it is *exactly* this question that makes me think that > it is a bad idea to introduce the anonymous access type. If > people simply think of this as a way to weaken typing (as in > the above array proposal), rather than as a way to solve a > particular problem in genericity at the interfacing level, I > am afraid that such features can do more harm than good. > I would much rather see Markus' anonymous array parameters in Ada than the existing anonymous array types, which are a pitfall for beginners yet add no new functionality. The Standard Pascal conformant array feature does indeed apply only at the level of (subprogram) interfacing, although complicated proposals to apply the idea more broadly were eventually included in Extended Pascal, essentially to provide Ada's unconstrained array type functionality. -- Bill Findlay Department of Computing Science The University of Glasgow