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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news.agarik.com!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Marius Amado Alves Newsgroups: comp.lang.ada Subject: Re: Magic ordering Date: Tue, 15 Mar 2005 16:21:25 +0000 Organization: Cuivre, Argent, Or Message-ID: References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <42309456$1@news.broadpark.no> <4232ab3a$0$26547$9b4e6d93@newsread4.arcor-online.net> <1110888090.283361.113590@z14g2000cwz.googlegroups.com> <11gvzgwy0zc0d$.zmffiqh7xd48$.dlg@40tude.net> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1110903713 51153 212.85.156.195 (15 Mar 2005 16:21:53 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Tue, 15 Mar 2005 16:21:53 +0000 (UTC) Cc: comp.lang.ada@ada-france.org To: mailbox@dmitry-kazakov.de Return-Path: In-Reply-To: <11gvzgwy0zc0d$.zmffiqh7xd48$.dlg@40tude.net> X-Mailer: Apple Mail (2.619.2) X-OriginalArrivalTime: 15 Mar 2005 16:21:26.0942 (UTC) FILETIME=[09A483E0:01C5297B] X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:9447 Date: 2005-03-15T16:21:25+00:00 On 15 Mar 2005, at 15:08, Dmitry A. Kazakov wrote: > There could be many orders defined on the same objects, as Hyman > rightfully > pointed out. But any of them have to be published in the contract. > There is > nothing outside the contract. There may be multiple contracts overlapping, or even disjoint, associated with the same type. That's how most systems are constructed. For example a part of the program gives you a contract for the deep meaning e.g. retrieve the person's name given the SS number. Another part is a contract that ascertains if the number is in a given set. They overlap. The latter does not need the name. The former does not need the set. I know this design is not an OO pearl, but it works, there's nothing wrong with it, and is present in most systems I've seen or built. On the (non-OO) extreme of this theory, there are no objects, just operations, a subset of which constitute each contract (well, each interface). I've been using formal packages a lot lately as an approximation of this. But we diverted very quickly from the mainline, creating an order for a type. As I said, I believe there's always a way: but it must be done case by case. Show me your type, and I'll show you a way. If there's no way I'll ask you: why do you want to order this type? If you show a good reason, I'll (hopefully) be able to identify the design fault.