From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Generics vs. O-O?
Date: Fri, 02 Aug 2013 10:00:30 -0700
Date: 2013-08-02T10:00:30-07:00 [thread overview]
Message-ID: <ktgo74$80h$1@dont-email.me> (raw)
In-Reply-To: <d474202c-4cee-49ef-9f93-9bf9ee6a89a6@googlegroups.com>
On 08/02/2013 08:36 AM, Alan Jump wrote:
>
> This is going off on a bit of a tangent, but as a new student of the
> language, I think a case could be made that many stand-alone packages or
> procedures in Ada are singletons, simply because of Ada's inherent strong
> typing. After all, what's a singleton? By definition, to be a singleton
> pattern, two criteria must be met: one and only one instance with a global
> point of access, and initialization on first use. (Source:
> http://sourcemaking.com/design_patterns/singleton)
Right. The "singleton type" is a kludge from languages that confuse the concepts
of type and module. In Ada, which properly separates these concepts, a singleton
is simply a package.
--
Jeff Carter
"You me on the head hitted."
Never Give a Sucker an Even Break
108
next prev parent reply other threads:[~2013-08-02 17:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 14:45 Generics vs. O-O? Eryndlia Mavourneen
2013-08-01 19:24 ` Dmitry A. Kazakov
2013-08-01 19:52 ` Eryndlia Mavourneen
2013-08-01 20:14 ` sbelmont700
2013-08-01 23:35 ` Yannick Duchêne (Hibou57)
2013-08-01 20:10 ` optikos
2013-08-01 20:26 ` Dmitry A. Kazakov
2013-08-01 20:35 ` Jeffrey Carter
2013-08-01 21:22 ` Bill Findlay
2013-08-01 23:38 ` Yannick Duchêne (Hibou57)
2013-08-01 22:20 ` Georg Bauhaus
2013-08-02 8:11 ` Dmitry A. Kazakov
2013-08-02 9:50 ` Georg Bauhaus
2013-08-02 14:09 ` Dmitry A. Kazakov
2013-08-02 15:08 ` Shark8
2013-08-02 15:36 ` Alan Jump
2013-08-02 17:00 ` Jeffrey Carter [this message]
2013-08-02 17:51 ` Dmitry A. Kazakov
2013-08-02 18:06 ` Alan Jump
2013-08-02 19:08 ` Dmitry A. Kazakov
2013-08-02 16:15 ` Dmitry A. Kazakov
2013-08-03 0:04 ` Yannick Duchêne (Hibou57)
2013-08-03 7:35 ` Georg Bauhaus
2013-08-03 8:57 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox