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,d1df6bc3799debed X-Google-Attributes: gid103376,public From: "W. Wesley Groleau (Wes)" Subject: Language Design Mistakes (was "not intended...") Date: 1997/05/12 Message-ID: <33776792.2E44@this.message>#1/1 X-Deja-AN: 241144090 Sender: usenet@most.fw.hac.com (News Administration) X-Nntp-Posting-Host: sparc02 References: <3.0.32.19970423164855.00746db8@mail.4dcomm.com> <5kl9qc$g4d@bcrkh13.bnr.ca> <5kmek2$9re@bcrkh13.bnr.ca> <33727FA5.5C7A@sprintmail.com> Organization: Hughes Defense Communications Newsgroups: comp.lang.ada Date: 1997-05-12T00:00:00+00:00 List-Id: Robert Dewar wrote: > Similarly, Fortran users will never put up with having to declare > all those array types, so let's allow anonymous array declarations: > > My opinion is that both these decisions are mistakes, they introduce > irregularity and confusion. As Robert said, making a design decision to placate a Fortran user is a mistake. But there is a place for arrays of anonymous types. If there is no conceivable reason for ever passing the value of an array to a subprogram or entry, or assigning to or from the array or a slice of it, then it will always be the only array of its type, so a superfluous type declaration is merely clutter _hindering_ source readability. (Some say the type name can be chosen for documentation value, but I don't see why that can't all go into the object name.) Since arrays that do not meet the above "uniqueness test" are quite awkward to handle anonymously (due to "strong typing"), there is no need for rigid "thou shalt never use an anonymous array type" rules. I have viewed a lot of code in my career, and I'm not just speculating when I call a superfluous type declaration "detracting clutter." (BTW, if an array type has only one instance, but additional variable/ parameter instances are "conceivable," then I do not take the above viewpoint.) * The rest of Robert's post I agreed with. ---------------------------------------------------------------------- Wes Groleau, Hughes Defense Communications, Fort Wayne, IN USA Senior Software Engineer - AFATDS Tool-smith Wanna-be w w g r o l at p s e u l t 0 1 dot f w dot h a c dot c o m SPAM should be sent to I.want.one@mailbombs.for.idiots.org If you don't want to pay $500 (see 47 USC 227), don't send it here. ----------------------------------------------------------------------