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 X-Google-Thread: 103376,b88383a5d9c51aa0 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.teledata-fn.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada-Singleton-Why does it work like this? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <5a7a870c-40e2-4803-8753-0f9cfd2b800f@k2g2000yql.googlegroups.com> <6d2b2c67-22fb-4283-87ab-58357e47d5ca@v39g2000yqm.googlegroups.com> <49cb8c2b$0$31330$9b4e6d93@newsspool4.arcor-online.net> <49cb9dcb$0$31337$9b4e6d93@newsspool4.arcor-online.net> Date: Thu, 26 Mar 2009 17:31:28 +0100 Message-ID: <6k8d6nbfz2zz$.1bhil11fs73pm.dlg@40tude.net> NNTP-Posting-Date: 26 Mar 2009 17:31:28 CET NNTP-Posting-Host: 1bd65a26.newsspool2.arcor-online.net X-Trace: DXC=J_2G:\jVFh4i6K;>iZ]763A9EHlD;3Yc24Fo<]lROoR1^YC2XCjHcb9O^aBVWN2hE6DNcfSJ;bb[5FCTGGVUmh?4LK[5LiR>kg2LG[19UfX@S> X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:5316 Date: 2009-03-26T17:31:28+01:00 List-Id: On Thu, 26 Mar 2009 16:22:51 +0100, Georg Bauhaus wrote: > Dmitry A. Kazakov schrieb: >> On Thu, 26 Mar 2009 15:07:39 +0100, Georg Bauhaus wrote: >> >>> Maciej Sobczak schrieb: >>> >>>> Or not - maybe it is a way to express some property of the *type* that >>>> cannot be expressed due to the limitations in the language? >>> If "type" means the tuple ({values}, operations), then these >>> should be a few types where |{values}| = 1. >> >> No, singleton does not mean "one value." > > Right, however, how can a type bedefined to have "one object" > if the type has a set of values of cardinality > 1? Type cannot be, because the semantics "it has one instance" cannot be expressed in terms of the type. There is no operation or value of the type that may reflect this semantics. It is a contract on somebody who uses the type in order to create instances of. Since creation is neither operation nor a value there is no way to bind it to a type. For example. Typically there is a factory used to create the instance of the singleton's type T. But the factory is another object of a different type F. So the semantics that T has one instance is expressed by the type F, rather than T. > That is, can "singleton" be made a property of a type > other than programmatically? My position that it cannot be. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de