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.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,6960ceaa57428e2f X-Google-Attributes: gid103376,public From: "Jean-Pierre Rosen" Subject: Re: Another important feature of Ada Date: 2000/11/19 Message-ID: <8v9g0p$ijp$1@wanadoo.fr>#1/1 X-Deja-AN: 695523101 References: <3A12041B.BCFD8CA0@worldnet.att.net> <8uu6tf$63d$1@nnrp1.deja.com> <3A12BBC6.E3FDAB0F@averstar.com> <8v5dkm$ftt$1@wanadoo.fr> <8v78bm01p5t@drn.newsguy.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Complaints-To: abuse@wanadoo.fr X-Trace: wanadoo.fr 974668633 19065 193.249.52.175 (19 Nov 2000 21:17:13 GMT) Organization: Wanadoo, l'internet avec France Telecom X-MSMail-Priority: Normal NNTP-Posting-Date: 19 Nov 2000 21:17:13 GMT Newsgroups: comp.lang.ada Date: 2000-11-19T21:17:13+00:00 List-Id: "pete@nospam" a �crit dans le message news: 8v78bm01p5t@drn.newsguy.com... > not sure that compiling against unimplemented specs is that important. > after all, you are just checking compiler syntax errors, and checking > against any mismatched types. And you can do that in almost any > other language. In Java for example using interfaces, and in C++ using > pure virtual functions. Sure, a compiler only detects violation of language rules - which in Ada goes far further than just syntax. Now; if you just use Ada like any low level language like Java, (i.e. you use only integer and other machine types), then it won't bring you much. If you really use all the expressive power of Ada to really model your domain problem, then you'll find that quite often, an error in your analysis will show up as an error when you compile or use your spec. That's certainly how it works for me. (Was qualifying Java "low level language" a troll ? Well, Java is AFAIK the only language that makes it explicit in its definition that it can run only on one single machine, and whose basic semantic model is totally dependant on the behaviour of that machine. The fact that this machine can be emulated on other machines is irrelevant). > And in practice, it is only after running the program against the > actual implementation that one finds for sure if the interface is > the right one, also many times the interface is changed as development > goes on. > This is exactly what we try to avoid, and may mean that maybe you just didn't use Ada to the full extent of its expressive power. Sure, an interface is never perfect right from the start, but the requirements dictate the interface, and you don't need any body to check that. Note also that the separation of specs and body make it extremely convenient to first develop a prototype body just to check dynamic semantic, then provide the actual implementation. Since you don't duplicate the spec, you are sure that the prototype and the actual match. -- --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://pro.wanadoo.fr/adalog