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,103b407e8b68350b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-04 05:28:37 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Anybody in US using ADA ? One silly idea.. Date: Tue, 04 Feb 2003 14:12:26 +0100 Message-ID: References: <1043938782.244443@master.nyc.kbcfp.com> <25ji3v8n915cnnnaqpjvm4f7i01a66r9pf@4ax.com> <1043949507.331484@master.nyc.kbcfp.com> <1044025336.3067@master.nyc.kbcfp.com> <1044033063.693737@master.nyc.kbcfp.com> <2b9s3vo3bbnaikqd6d4jpppfflfq2kbgfu@4ax.com> <1044278793.419261@master.nyc.kbcfp.com> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 1044364346 38656511 212.79.194.111 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:33759 Date: 2003-02-04T14:12:26+01:00 List-Id: On 04 Feb 2003 10:10:25 GMT, Colin_Paul_Gloster@ACM.org (Colin Paul Gloster) wrote: >Timestamped Mon, 03 Feb 2003 10:59:39 +0100, >news:2b9s3vo3bbnaikqd6d4jpppfflfq2kbgfu@4ax.com by >Dmitry A. Kazakov contains: > >"On Fri, 31 Jan 2003 12:11:03 -0500, Hyman Rosen >wrote: > >[..] >>[..] You claim that there is benefit >>in requiring that types support unused operations. I >>don't see what that benefit is, or where you cut off >>the infinite list of possible operations that a type >>could conceivably support. > >If you define a type, say, "field". Then you should implement all >operations of the field." > >Yes. > >"Otherwise, it is not a field, but a group or >something else." > >Yes. > >"So the users of your type would have no delusions >about it. If it has interface of a group, why to present it as field?" > >Indeed. And why if it has operations you do not need, are you >defining this type and using it? > >"It is just DbC. Ada gives an example of this approach: when you derive >from an abstract type, the derived non-abstract type has to implement >all abstract operations, no matter whether some of them will never be >used. Failure to do that is a *compile-time* error. Same thing with >C++ templates produces a "valid" program! (Ada generics are safer in >this respect)" > >Having unused procedures (of unknown quality) is not safe. Any procedure of unknown quality is unsafe. A fact that a procedure is called somewhere will not make it more or less safe. However using stronger preconditions than necessary [i.e. requiring a type to be a field, where just a group would be OK] is indeed a bad design and in the end unsafe. >Timestamped Mon, 03 Feb 2003 17:12:24 +0100, >news:lats3vchsfmpaqiid539c8l7q0293eelcf@4ax.com by >Dmitry A. Kazakov has: > >"On Mon, 03 Feb 2003 08:26:33 -0500, Hyman Rosen >wrote: > >[..] > >>You then >>claim that this implicit interface needs to be augmented >>with operations that the procedure doesn't need, and then >>that types upon which the procedure operates need to have >>these useless operations, and that this somehow achieves >>safety! I am just baffled. > >They are not useless, they constitute the type. [..]" > >There are not used therefore they are useless. Do you remember the last time you used Arccoth? Is it useless? Should an Ada compiler implement it as exp, because the program I am writing at the moment does not use it? Useless for a particular program /= useless for any possible program. --- Regards, Dmitry Kazakov www.dmitry-kazakov.de