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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.28.77 with SMTP id c74mr692234itc.55.1508559155870; Fri, 20 Oct 2017 21:12:35 -0700 (PDT) X-Received: by 10.157.23.167 with SMTP id j36mr260596otj.7.1508559155841; Fri, 20 Oct 2017 21:12:35 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!l196no2862826itl.0!news-out.google.com!p6ni975itp.0!nntp.google.com!l196no2862825itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 20 Oct 2017 21:12:35 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.167.212.178; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR NNTP-Posting-Host: 85.167.212.178 References: <5b65b9f0-25d9-449a-b7eb-d1fc112f293f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: About good practice: Should protected objects be small? From: reinert Injection-Date: Sat, 21 Oct 2017 04:12:35 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2207 X-Received-Body-CRC: 2200814233 Xref: news.eternal-september.org comp.lang.ada:48540 Date: 2017-10-20T21:12:35-07:00 List-Id: On Friday, October 20, 2017 at 8:27:41 PM UTC+2, Niklas Holsti wrote: > On 17-10-20 17:50 , reinert wrote: > > I am testing out using protected objects. ...snip... > > If your concern is the size of a protected object in terms of the number > of source lines of code, do remember that you can call out from a > protected subprogram to ordinary subprograms, which can be separate. Of > course you must then pass the protected private data as parameters to > those subprograms. (Sometimes unit-testing tools force this kind of > structure anyway, becase the private parts of a PO may not be visible to > the tool.) > OK, this is what I did (to avoid a more than 2000 lines protected object body). However, I would like a stub ("is separate"). Why they did not allow this in a protected object? I thought the reason was that protected objects should be "small" for some good reasons (at least in terms of number of statements). reinert > -- > Niklas Holsti > Tidorum Ltd > niklas holsti tidorum fi > . @ .