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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e72247a27f4ea778,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-10 06:59:00 PST Path: bga.com!news.sprintlink.net!uunet!in1.uu.net!explorer.csc.com!usenet From: Jeff Seigle Newsgroups: comp.lang.ada Subject: Re: Enforcing concepts in the language (was: Re: Implement Inheritance (Ada83)?) Date: 10 Mar 1995 14:44:50 GMT Organization: CSC Intelicom HQ, Bethesda MD Message-ID: <3jpol2$nab@explorer.csc.com> NNTP-Posting-Host: jseigle-pc.hq.csci.csc.com X-Newsreader: Date: 1995-03-10T14:44:50+00:00 List-Id: In article brennan@panther.warm.inmet.com (William Brennan) writes: >In article <3jiala$kqs@explorer.csc.com>, >Jeff Seigle wrote: >>[...] >>once the code is >>written there is no enforcement of your wonderful ideas, and the next >>one to come along with a mod can stomp down all of your imaginary fences. > >And even having a design technique supported by the language is not enough. >Almost all of the packages I have written over the past 5 years use >private types for data abstraction. I have regularly seen occurences where >some maintainer would come by, figure he/she didn't have immediate >enough access to the type and move it into the visible part of the spec, >breaking the encapsulation, of course. One can hear them muttering under >their breath: "What's this _private_ stuff for anyway, it's only getting in >my way!" I have heard many programmers say right *over* their breath, "What's this private stuff for anyway, it's only getting in my way!" I also heard one programmer say, "This 'package' stuff is just making my life difficult." This problem is one that always looms and no amount of design, language support, documentation, or general head-pounding can help. (BTW the Fortran technique was to define a subroutine with the encapsulated variables, then define an entry for each operation. Each entry has to have a return before the next entry declaration. You aren't supposed to call the subroutine, only the entries. But there's no way to enforce the concept in maintenance.) Jeff