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.4 required=5.0 tests=BAYES_00,UNCLOSED_BRACKET autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,585fd78267abd80c X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 30 Jul 2008 11:06:16 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: On pragma Precondition etc. References: <4889886d$0$18827$9b4e6d93@newsspool2.arcor-online.net> <6etsi6F8mbmbU2@mid.individual.net> <488efc8d$1@news.post.ch> <488f26e8$0$20705$9b4e6d93@newsspool4.arcor-online.net> <1668bcqbkwlun$.mzzrx5m5ug2t$.dlg@40tude.net> <488f3d67$0$20703$9b4e6d93@newsspool4.arcor-online.net> <13nqxvysv2w75.bpxxsup39g9u$.dlg@40tude.net> In-Reply-To: <13nqxvysv2w75.bpxxsup39g9u$.dlg@40tude.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <48902f08$0$1064$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 30 Jul 2008 11:06:16 CEST NNTP-Posting-Host: d2660129.newsspool3.arcor-online.net X-Trace: DXC=DjBG>BgkbF9n`gW2MTm]<3McF=Q^Z^V384Fo<]lROoR14nDHegD_]R5L4D`beN@^E?nc\616M64>:Lh>_cHTX3j=NQZF:h>I9[9 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:7109 Date: 2008-07-30T11:06:16+02:00 List-Id: Dmitry A. Kazakov schrieb: > On Tue, 29 Jul 2008 17:55:18 +0200, Georg Bauhaus wrote: >> What if one precondition states a relation between two suprogram >> parameters, or between properties of two suprogram parameters? > > This case is equivalent to full multiple dispatch. Ada does not have it. If > it had multiple dispatch then it would clearer how to deal with the > corresponding contracts (=conditions). How about this: For the purpose of expressing the contract of a subprogram, dream up its "contract-type". Base this type on (1) the precursor's contract-type (up the derivation hierarchy) (2) the profile So given function Foo(X, Y: Integer) return Whatever; denote the precondition of its "contract-type" by something like Foo'Precondition;