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.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site cavell.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!ihnp4!alberta!cavell!mouli From: mouli@cavell.UUCP (Bopsi ChandraMouli) Newsgroups: net.lang.mod2,net.lang.ada Subject: Is Modula-2 superior to Ada? Message-ID: <12@cavell.UUCP> Date: Thu, 1-Nov-84 13:02:16 EST Article-I.D.: cavell.12 Posted: Thu Nov 1 13:02:16 1984 Date-Received: Fri, 2-Nov-84 07:06:11 EST Distribution: net Organization: U. of Alberta, Edmonton, AB List-Id: Recently I started reading about Ada and I was surprised to a great extent that Modula-2 outshines Ada with respect to interface specification of program units. Things in Ada that I feel, are inferior to Modula-2 are: 1) You can not have anything else in the specification part other than the ones you are exporting. This can result in cumbersome specification. 2) Packages can not selectively IMPORT objects from other packages. It is either ALL or NONE situation. This will have severe impact on the readability of the source code. I feel that Modula-2's SELECTIVE import and export mechanisms contribute to better PROGRAM READABILITY AND SCOPE CONTROL than Ada's import and export mechanisms. 3) For private and Limited private types you have to give the full representation of the types in the specification part itself. This is really annoying. Even at the specification stage you are forced to take a decision on the representation which may not always be possible. Also, it is a good idea to hide the representation in addition to making it inaccessible outside the package. The specification part usually serves as a good documentation feature and why give other programmers some details which are totally unnecessary. I am curious to know what others feel about these views. Is there any good reason behind the design of such (Ada's) interface specification mechanisms? Bopsi Chandramouli U. of. Alberta.