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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.3d73Ybk3C5U4I2t8lv+lAQ.user.gioia.aioe.org!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada vs Eiffel Date: Mon, 14 Oct 2019 18:13:09 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <87a7a3l8wo.fsf@gmail.com> <871rvfl5vr.fsf@gmail.com> NNTP-Posting-Host: 3d73Ybk3C5U4I2t8lv+lAQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:57274 Date: 2019-10-14T18:13:09+02:00 List-Id: On 2019-10-14 17:10, Saša Janiška wrote: > "Dmitry A. Kazakov" writes: > >> IMO, Eiffel treats contracts wrong. > > Can you say something more in regard? I'm really curious to learn... A contract cannot be asserted or checked at run-time. That is not a contract, that is a behavior. Introducing a check does not add safety unless its failure is handled. If not, it is just a bug with or without the check. Most of Ada debugging is related to unhandled exceptions from run-time checks. A proper contract is one proved statically. This is what SPARK is for. This does not mean you need no checks, it means that they must be treated properly, considering a possibility of failure and the program state should such failure happens. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de