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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,174ec7dc941a1068 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Factory Pattern References: <1185387571.367570.163160@r34g2000hsd.googlegroups.com> <1185432247.046242.24300@o61g2000hsh.googlegroups.com> In-Reply-To: <1185432247.046242.24300@o61g2000hsh.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1185531381 12.201.97.213 (Fri, 27 Jul 2007 10:16:21 GMT) NNTP-Posting-Date: Fri, 27 Jul 2007 10:16:21 GMT Organization: AT&T ASP.att.net Date: Fri, 27 Jul 2007 10:16:21 GMT Xref: g2news2.google.com comp.lang.ada:1218 Date: 2007-07-27T10:16:21+00:00 List-Id: Maciej Sobczak wrote: > On 26 Lip, 02:51, "Jeffrey R. Carter" > 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