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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6960ceaa57428e2f X-Google-Attributes: gid103376,public From: Mark T Subject: Re: Another important feature of Ada Date: 2000/11/15 Message-ID: <8uu6tf$63d$1@nnrp1.deja.com>#1/1 X-Deja-AN: 693904335 References: <3A12041B.BCFD8CA0@worldnet.att.net> X-Http-Proxy: 1.0 lax-gate2.raytheon.com:8080 (Squid/2.2.STABLE5), 1.0 x64.deja.com:80 (Squid/1.1.22) for client 147.24.143.149, 199.46.200.231 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Nov 15 14:34:23 2000 GMT X-MyDeja-Info: XMYDJUIDmmt_taube Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (WinNT; I) Date: 2000-11-15T00:00:00+00:00 List-Id: > C++ supports this separation by means of the #include syntax inherited > from C. Of course, the problem with the #include syntax is that it > does not enforce the separation of interface and implementation. As > in many other features of C/C++, this is left up to the discipline of > the software developer. > > It is interesting that Ada has been cited as being possibly the perfect > example of a language fully supporting and enfocing the separation of > interface and implementation through the use of Ada bodies and > specifications. > I do more C programming than Ada, but until I learned Ada I did not fully appreciate "programming to an interface". I think it is one of the best ways to get users of your modules to ignore the inner workings and utilize the blackbox specification. When you have a 100,000 lines of code everbody on the project can't be an expert on every LOC. The small amount of subroutine name duplication doesn't seem to be much of problem versus the benefit gained. On the other hand, the interface specification should fully point out any limitations, etc, a "contract" needs to be fully defined for usage of that module. (Sometimes programmers like to bury this info in the implementation). Sent via Deja.com http://www.deja.com/ Before you buy.