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,5c89acd494ea9116 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!r29g2000hsg.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Self pointer in limited record Date: Tue, 04 Sep 2007 07:55:21 -0700 Organization: http://groups.google.com Message-ID: <1188917721.390096.265690@r29g2000hsg.googlegroups.com> References: <1183577468.034566.57830@n60g2000hse.googlegroups.com> <1188578849.187422.280620@50g2000hsm.googlegroups.com> <9fy1xoukz1e3$.h574sqmiauri$.dlg@40tude.net> <46d968ee$0$30368$9b4e6d93@newsspool4.arcor-online.net> <137iu0lr82dtb$.wqy3zjz2vr9q.dlg@40tude.net> <6u642u4cyw.fsf@hod.lan.m-e-leypold.de> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1188917722 5342 127.0.0.1 (4 Sep 2007 14:55:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 4 Sep 2007 14:55:22 +0000 (UTC) In-Reply-To: <6u642u4cyw.fsf@hod.lan.m-e-leypold.de> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: r29g2000hsg.googlegroups.com; posting-host=66.126.103.122; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1729 Date: 2007-09-04T07:55:21-07:00 List-Id: On Sep 1, 8:33 am, Markus E L wrote: > "Dmitry A. Kazakov" wrote: > > On Sat, 01 Sep 2007 15:33:09 +0200, Georg Bauhaus wrote: > > >> (The true O-O programmer might suggest that we should simply > >> pass an additional object-as-module parameter to every > >> package subprogram... ) > > > Yes, it is better to keep packages stateless. > > Not if they are singletons, i.e. objects of which only one instance > can occur in the program. Then they are better modeled as packages. The trouble is, I can think of several occasions in which I assumed an object could only have one instance---and then later found reason to wish I had written it so that there could be two. No, this doesn't happen in all cases. But it seems to me it happens often enough that one should carefully examine any assumption that there can be only one instance. Or be prepared to go back and make some major changes later. -- Adam