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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,cb04cee6116c8ced X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!postnews.google.com!q27g2000yqn.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Package's private parts and protected types Date: Mon, 8 Feb 2010 01:11:13 -0800 (PST) Organization: http://groups.google.com Message-ID: <472288fc-b5da-42c4-9e1b-1da1af5de896@q27g2000yqn.googlegroups.com> References: <7ff3810f-3ee3-4f39-a54c-933ad7d0655c@36g2000yqu.googlegroups.com> NNTP-Posting-Host: 86.66.190.226 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1265620273 16214 127.0.0.1 (8 Feb 2010 09:11:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 8 Feb 2010 09:11:13 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q27g2000yqn.googlegroups.com; posting-host=86.66.190.226; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8966 Date: 2010-02-08T01:11:13-08:00 List-Id: On 8 f=E9v, 09:30, Martin wrote: > This is true of task types too. Indeed > We take the view that if something was a task/protected or not should > be hidden from a user (e.g. we may change the behaviour from being > task based/not protected, so we abstract away that information). Your suggestion seems to confirm a feeling I was expressing in a previous thread : http://groups.google.com/group/comp.lang.ada/browse_thread/thread/385c146dd= 3112519?hl=3Dfr# (sorry for pure Usenet user, it's a google-newsgroup link) > [...] > Any way, a request made to a task is blocking as long as the task is > not ready to fulfill the request (the rendezvous, which is the Ada > primitive for synchronization). So, from the client point of view, a > method implemented on top of a task is not a different thing than a > method implemented on top of a procedure. > [...] > The associated 'rule' for callers is that they can't assume that calls to > any operation don't block - but that's true of calling pretty much any > package anyway. On one hand, an implementation level detail On the other hand, something which I feel should be part of the interface. I would like to underline : =93 part of the interface =94, because while I was writing these four words, I though =93 part of the interface... but what about the specification ? =94 Most of time I use the words Interface and Specification as equivalent, but there, I see it's not the same. Blocking, is unlikely to be part of any required specification. In the mean time, None- Blocking, is most likely to be a specification requirement. So : implementation detail or mediumly part of specifications ? > I wonder if there is room for "pragma (Not_)Blocking"?...Not just as a > visual aid but maybe it could also be used extend the usage of "pragma > Detect_Blocking" to wrappers for "foreign languages". This sounds good to me in someway (I mean providing the latter question can be answered), as I was also on my side, thinking about a similar thing : should or should not, Ada, have a keyword or a pragma to tell a particular method is potentially blocking ? In the other thread I've pointed, someone suggested me tasks as record components is most of time not a good idea. But as the only way to hide private features, is to wrap the target item in a private record (possibly tagged by the way) type, I wonder what was the reason of this suggestion to avoid it. Do you have on you side some feedback to give about experiencing with task wrapped in private records ? What may be the shortcomings or traps when using tasks as record components ?