comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Private extension of a synchronized interface
Date: Sun, 17 Feb 2019 15:52:38 +0100
Date: 2019-02-17T15:52:38+01:00	[thread overview]
Message-ID: <q4bsfm$8k3$1@gioia.aioe.org> (raw)
In-Reply-To: 51243c9b-baba-43ad-b227-fe39c045d403@googlegroups.com

On 2019-02-17 14:46, Jere wrote:
> On Sunday, February 17, 2019 at 4:50:24 AM UTC-5, Dmitry A. Kazakov wrote:
>>
>> But synchronized interfaces are totally bogus from the software design
>> POV. It is a pure implementation aspect exposed. Why do you care?
>> Aggregate a protected object and delegate primitive operations to it.
>>
> 
> That's what I am doing as my own solution.  I was intrigued with the code
> above as an alternate solution because it could potentially give a
> compile time indication that a procedure was a protected operation (as
> opposed to me relying on simply providing that via comments).

Given to who? The compiler knows already, the user should not care. It 
is an implementation aspect which simply does not belong here.

What could make sense is an entry interface, a primitive operation which 
could be queued/requeued to, used in timed entry call etc.

> A delegate non protected procedure has to rely on the comment.

There is no contract that could require it protected. It is a property 
of the object/task and no property of an operation. You could not do 
anything with a task or protected object that would not resolve into a 
protected action anyway.

[...]

> However, I honestly
> wanted to know why Ada allowed one to setup the private extension but not
> allow you to actually provide the functions (or if this was a GNAT issue or
> if I was just not using the right syntax).  So the reason I care was a
> thirst for knowledge of how things work.

Ada 2005 stuff, most of it makes little sense to me. It was some 
halfhearted attempt to unite tagged types with tasks and protected 
objects with no desire to actually do that...

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2019-02-17 14:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-16  0:52 Private extension of a synchronized interface Jere
2019-02-17  9:50 ` Dmitry A. Kazakov
2019-02-17 13:46   ` Jere
2019-02-17 14:52     ` Dmitry A. Kazakov [this message]
2019-02-17 15:36       ` Jere
2019-02-17 16:28         ` Dmitry A. Kazakov
2019-02-17 20:56           ` Jere
2019-02-17 22:36 ` Simon Wright
2019-02-18  0:36   ` Jere
2019-02-18  8:11     ` Dmitry A. Kazakov
2019-02-18  8:29       ` Simon Wright
2019-02-18  8:42         ` Dmitry A. Kazakov
2019-02-18  8:26     ` Simon Wright
2019-02-18  8:33     ` Simon Wright
2019-02-18 15:40       ` Jere
2019-02-18 17:24         ` Simon Wright
2019-02-19 11:04           ` Simon Wright
2019-02-20  2:36             ` Jere
2019-02-20 10:46               ` Simon Wright
2019-02-20 15:04                 ` Jere
2019-02-18 15:49       ` Jere
2019-02-18 22:06 ` Randy Brukardt
2019-02-18 22:35 ` Randy Brukardt
2019-02-19 10:01   ` Egil H H
2019-02-19 11:29     ` Simon Wright
2019-02-19 11:53       ` Egil H H
2019-02-20  2:32   ` Jere
2019-02-20 13:46   ` Simon Wright
2019-02-20 23:43     ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox