comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada-Singleton-Why does it work like this?
Date: Thu, 26 Mar 2009 17:31:28 +0100
Date: 2009-03-26T17:31:28+01:00	[thread overview]
Message-ID: <6k8d6nbfz2zz$.1bhil11fs73pm.dlg@40tude.net> (raw)
In-Reply-To: 49cb9dcb$0$31337$9b4e6d93@newsspool4.arcor-online.net

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



  reply	other threads:[~2009-03-26 16:31 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24 19:01 Ada-Singleton-Why does it work like this? patrick.gunia
2009-03-24 19:10 ` Pascal Obry
2009-03-24 20:47 ` Jeffrey R. Carter
2009-03-25  0:10   ` Martin
2009-03-25  0:41     ` Jeffrey R. Carter
2009-03-25  9:30     ` Dmitry A. Kazakov
2009-03-26  8:55       ` Martin
2009-03-26  9:28         ` Dmitry A. Kazakov
2009-03-26 13:39           ` Maciej Sobczak
2009-03-26 14:07             ` Georg Bauhaus
2009-03-26 14:33               ` Dmitry A. Kazakov
2009-03-26 15:22                 ` Georg Bauhaus
2009-03-26 16:31                   ` Dmitry A. Kazakov [this message]
2009-03-26 14:28             ` Dmitry A. Kazakov
2009-03-26 22:00               ` Maciej Sobczak
2009-03-27 10:02                 ` Dmitry A. Kazakov
2009-03-25 22:29   ` sjw
2009-03-24 20:52 ` Ludovic Brenta
2009-03-25  9:59   ` patrick.gunia
2009-03-25 10:29     ` Jean-Pierre Rosen
2009-03-25 11:26     ` Georg Bauhaus
2009-03-25 11:49       ` patrick.gunia
2009-03-29  7:29     ` Jacob Sparre Andersen
2009-03-24 21:21 ` Dmitry A. Kazakov
2009-03-25 10:07   ` patrick.gunia
2009-03-25 10:57     ` patrick.gunia
2009-03-25 11:40       ` Georg Bauhaus
2009-03-25 11:46       ` Ludovic Brenta
2009-03-25 11:55         ` patrick.gunia
2009-03-25 14:10         ` patrick.gunia
2009-03-25 14:40           ` Ludovic Brenta
2009-03-25 15:16             ` Adam Beneschan
2009-03-25 15:19             ` patrick.gunia
2009-03-25 16:52               ` Georg Bauhaus
2009-03-25 11:10     ` Dmitry A. Kazakov
2009-03-25 11:37       ` patrick.gunia
2009-03-25 12:07         ` Ludovic Brenta
2009-03-25 15:00         ` Robert A Duff
2009-03-25 11:17     ` Jean-Pierre Rosen
2009-03-26  9:04       ` Martin
2009-03-25 11:38     ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox