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 07:23:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.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 16:22:59 +0100 Message-ID: References: <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 1044372182 39400802 212.79.194.111 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:33770 Date: 2003-02-04T16:22:59+01:00 List-Id: On 04 Feb 2003 14:33:31 GMT, Colin_Paul_Gloster@ACM.org (Colin Paul Gloster) wrote: >In news:e2ev3vop3gm2gi7q3m0k3eunsluf0i4v95@4ax.com , Dmitry A. Kazakov >wrote: >"Any procedure of unknown quality is unsafe. A fact that a procedure is >called somewhere will not make it more or less safe. [..]" > >Inventing a datatype when you are writing/designing a program and using >just some of its procedures (which you have just invented) does not make >them safe, but you are more likely to notice if they are incorrect than >the unused procedures. > >"[..] >>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?" > >Irrelevant. I am not advocating inventing datatypes whose subprograms I >know I will definitely not all use for the problem I am trying to solve, >but which I might use in a future program. > >"Useless for a particular program /= useless for any possible program." > >Agreed. But if some of the subprograms are never ever used, they were a >waste of effort. Yes, but the problem is that we never know for sure. So it is always better to stay on the safe side. If the type represents some well-known thing, then it is better to fully implement it. Alternatively, [what I actually always wished to see in Ada], one could make this type abstract and implement only a part of the operations [which you will definitely use]. Then you would derive from it an non-abstract type and disallow all the operations you do not want. So the type will explicitly indicate the fact that some operations are not supported. --- Regards, Dmitry Kazakov www.dmitry-kazakov.de