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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a046ce7f5ee1fa51 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-04 12:21:37 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: new_line in a put_line Date: 04 Dec 2002 20:21:24 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <8d9suu4d65a91bu1qf9hl0eb9dpo2h8c02@4ax.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1039033296 7486 62.49.19.209 (4 Dec 2002 20:21:36 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 4 Dec 2002 20:21:36 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:31446 Date: 2002-12-04T20:21:24+00:00 List-Id: tmoran@acm.org writes: > > The problem as I see it, is of course that one tries to express a > > CRITICAL SECTION in terms of OBJECTS. This *cannot* be good. The first > > is about execution flow control the second is about data. > Then you should use a task. Using the lock object is a short, possibly > faster, idiom to accomplish the purpose. It's like the "good morning" in > "Good morning gentlemen. I have some bad news..." You are not trying to > say the morning is a good one, you are trying to say "ok, let's get > started, I have the floor and want your attention." "Good morning" is > quicker. > It may require some comments to explain what's going on to someone > unfamiliar with the idiom, but it's a valuable idiom. A recent thread > here mentioned using an asm string scan operation in conjunction with > boolean arrays. A purist might say that's not what it was intended for, > but a pragmatist would say it's an excellent idea. I suppose the tension is between an open protocol, using lock objects, with the risk that someone forgets to use it, and a closed protocol which ensures that people do the right thing but requires interfaces for all the things they need to do.