From: Jere <jhb.chat@gmail.com>
Subject: Re: Private extension of a synchronized interface
Date: Sun, 17 Feb 2019 05:46:17 -0800 (PST)
Date: 2019-02-17T05:46:17-08:00 [thread overview]
Message-ID: <51243c9b-baba-43ad-b227-fe39c045d403@googlegroups.com> (raw)
In-Reply-To: <q4baou$1pbj$1@gioia.aioe.org>
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). A delegate
non protected procedure has to rely on the comment. I didn't even want
the interface to use as an interface, just as a means to at the API level
to have a compiler enforced indication that the procedure was from a
protected object. I started with a protected object in the public view
but the implementation details of the private part of the protected object
led to about 10 lines of code (type declarations and a couple of package
specifications) that had no use to the public view but had to be there
because of how protected object declarations work. I saw this as a potential
means of information hiding. My actual solution is as you suggested with
delegate operations that call the protected object. 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.
next prev parent reply other threads:[~2019-02-17 13:46 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 [this message]
2019-02-17 14:52 ` Dmitry A. Kazakov
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