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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X Date: Tue, 8 Apr 2014 12:56:44 +0200 Organization: cbb software GmbH Message-ID: <19384s71yogdn$.158n6df3hrgxg$.dlg@40tude.net> References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <8bhozh836pyt$.1qctlysud0s2q$.dlg@40tude.net> <1cdsyxjzsfgzm.1synpaujysv21$.dlg@40tude.net> <1aa804jg9qq4o$.wdiq33yo621l.dlg@40tude.net> <5343cc52$0$6705$9b4e6d93@newsspool2.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: AuYlnUSfTZrfhAkRjyySpQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 2876 Xref: number.nntp.dca.giganews.com comp.lang.ada:185628 Date: 2014-04-08T12:56:44+02:00 List-Id: On Tue, 08 Apr 2014 12:15:45 +0200, G.B. wrote: > On 08.04.14 11:15, Dmitry A. Kazakov wrote: >>> Constrained types*are* useless -- Ada has no such thing. It only has >>> >unconstrained types (remember that names only apply to subtypes). And in >>> >particular, a constrained class-wide type is an evil thing, because it's >>> >mixing things that should not be mixed: relaxing and tightening constraints >>> >at the same time. >> OK, constraining is useless, discriminants are evil, specific instances of >> classes are wrong. We have to agree to disagree. > > Reminder: an Ada "type", formally, is different from the "type" > that Dmitry has in mind (seeing subtype constraints as > establishing a "type", IIRC, which, for the most part, it isn't > doing, in Ada). > > It might help to have a USENET specific type of link > that establishes evidence of the difference in terminology. Can be found in any textbook: type is a set of values bound by operations defined on these values Yes, Ada's subtype is a type, no less than C++'s class is. But however you call it, Randy's point was about putting a constraint on some set of values being useless. I can guess that his position is motivated by the ideas of LSP subtyping. Surely Ada's subtyping is in contradiction with LSP-subtyping. That does not make Ada's subtyping any useless or evil. On the contrary, it rather does the LSP-subtyping. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de