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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10a146,4bb8013d19e57516 X-Google-Attributes: gid10a146,public X-Google-Thread: 1108a1,4bb8013d19e57516 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,bba17246b006a26c,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-29 14:02:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!bad-news.newsread.com!netaxs.com!newsread.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsfeed0.news.atl.earthlink.net!news.atl.earthlink.net!news.mindspring.net!not-for-mail From: Richard Riehle Newsgroups: comp.object,comp.lang.java.programmer,comp.lang.ada Subject: Re: Where have all the Architects gone? Date: Fri, 29 Mar 2002 14:02:29 -0800 Organization: AdaWorks Software Engineering Message-ID: <3CA4E474.A8742B8E@adaworks.com> References: <3C99C7CF.8E019311@gperkins.co.uk> <3C99E364.D166CB69@acm.org> <3CA0A830.B2B55FDF@adaworks.com> <3CA4C0D5.D3696B3C@adaworks.com> Reply-To: richard@adaworks.com NNTP-Posting-Host: 41.b2.6d.d3 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 29 Mar 2002 22:01:37 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: archiver1.google.com comp.object:37481 comp.lang.java.programmer:141889 comp.lang.ada:21863 Date: 2002-03-29T22:01:37+00:00 List-Id: Michael Feathers wrote: > "Richard Riehle" wrote > > If compile-time checking were restricted to ensurring the > > conformance static types, it would be of minimal value. > > When adding to that static type checking other kinds of > > compile-time checks, it becomes more useful and more > > robust. > > Richard, what are the other checks that you are talking about? I will give just one out of many other examples. Ada allows something we call access to subprogram as well as access to declared object. In other languages this is also permitted using something called pointers. With Ada, such accesses are under strict rules that prevent dangling references, references that might be out of scope, etc. Although this is closely-coupled with the type system, it is slightly beyond the type system. Let me give another, one of my favorites because it is the source of more frustration for programmers new to to Ada than any other thing: strict separation of scope and visibility. In Ada, no entity is directly visible even when it is in scope. I realize some other languages support a modest level of checking on this, but Ada takes it to what some regard as an absurd extreme. That extreme has helped me avoid some really stupid errors over the years. Another example is something called named association. When making subprogram (function and procedure) calls, creating instances of generic templates, or declaring constrained objects from unconstrained types, one may name the formal parameter and explicitly associate it with the actual parameter. This makes for really good documentation of delivered source code. It is especially useful when on has a routine in which some of the parameters have default values. I could give dozens of examples. They almost all have something to do with the type system, but extend well beyond what one would think of as simple type checking. Richard Riehle