comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@acm.nospam.org>
Subject: Re: Factory Pattern
Date: Fri, 27 Jul 2007 10:16:21 GMT
Date: 2007-07-27T10:16:21+00:00	[thread overview]
Message-ID: <VBjqi.41910$Fc.25058@attbi_s21> (raw)
In-Reply-To: <1185432247.046242.24300@o61g2000hsh.googlegroups.com>

Maciej Sobczak wrote:
> On 26 Lip, 02:51, "Jeffrey R. Carter"
> <spam.jrcarter....@acm.nospam.org> wrote:
> 
>> I would think that an enumeration type would be better than Integer for
>> selecting among a few choices. Using Integer probably reflects C/++
>> thinking.
> 
> No. C and C++ have enumerations.

Which are just names for integer values, last time I looked. The type of 
a function parameter would be int. And even if that's not the case, 
experienced users are accustomed to doing it this way from the days 
before it had them. And even newer users are accustomed to seeing it 
done this way in the code they've been exposed to. And even if that's 
not the case, C/++, emphasizing ease of writing over ease of reading, 
induces a mindset in the user of "why bother typing this enumeration 
definition and using it when I can just say int?" All of these are 
symptoms of "C/++ thinking".

-- 
Jeff Carter
"Beyond 100,000 lines of code you
should probably be coding in Ada."
P. J. Plauger
26



  parent reply	other threads:[~2007-07-27 10:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 18:19 Factory Pattern shaunpatterson
2007-07-25 18:28 ` Martin
2007-07-25 18:51 ` Dmitry A. Kazakov
2007-07-25 21:06   ` Georg Bauhaus
2007-07-25 19:27 ` Matthew Heaney
2007-07-26  0:51 ` Jeffrey R. Carter
2007-07-26  6:44   ` Maciej Sobczak
2007-07-26  8:40     ` Georg Bauhaus
2007-07-26  9:53       ` Dmitry A. Kazakov
2007-07-26 11:01         ` Georg Bauhaus
2007-07-26 13:02           ` Maciej Sobczak
2007-07-26 13:44             ` Dmitry A. Kazakov
2007-07-26 14:58             ` Georg Bauhaus
2007-07-26 22:31             ` Randy Brukardt
2007-07-27 13:07               ` Maciej Sobczak
2007-07-27 14:23                 ` shaunpatterson
2007-07-27 22:23                 ` Randy Brukardt
2007-07-28 18:56                   ` Maciej Sobczak
2007-07-29  7:54                   ` Maciej Sobczak
2007-07-29  8:53                     ` Dmitry A. Kazakov
2007-07-29 10:53                     ` Georg Bauhaus
2007-07-26 16:58         ` Adam Beneschan
2007-07-29 11:38         ` Manuel Gomez
2007-07-27 10:16     ` Jeffrey R. Carter [this message]
2007-07-27 12:47       ` Maciej Sobczak
2007-08-26  7:18         ` David Thompson
replies disabled

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