From: Jeffrey R. Carter on
Stephen Leake wrote:
> Georg Bauhaus <rm.dash-bauhaus(a)futureapps.de> writes:
>
>> Will it, in theory, be possible to write a Qt-like library
>> in Ada such that client programs declare variables like
>>
>> W : Some_Window'Class := Some_Lib_Pack.Make (Typ => Some_Id);
>>
>> That is, programs do not use access Some_Window'Class?
>
> No. Because the underlying C++ uses pointers, so the Ada has to as well.

In the implementation, sure. But the question was about the client; I suspect it
would be possible to design the binding so the client need not use pointers.

--
Jeff Carter
"We burst our pimples at you."
Monty Python & the Holy Grail
16
From: Simon Wright on
"Randy Brukardt" <randy(a)rrsoftware.com> writes:

> declare
> My_Window : Claw.Basic_Window.Window;
> begin
> Global_Window.Replace_Element (Root_Window_Type'Class(My_Window));
> end;

So Claw.Basic_Window.Window isn't limited?

Not immediately clear what the semantics of copying a window are (absent
any knowledge of Claw!)
From: Randy Brukardt on
"Simon Wright" <simon(a)pushface.org> wrote in message
news:m2typ92z53.fsf(a)pushface.org...
> "Randy Brukardt" <randy(a)rrsoftware.com> writes:
>
>> declare
>> My_Window : Claw.Basic_Window.Window;
>> begin
>> Global_Window.Replace_Element (Root_Window_Type'Class(My_Window));
>> end;
>
> So Claw.Basic_Window.Window isn't limited?
>
> Not immediately clear what the semantics of copying a window are (absent
> any knowledge of Claw!)

Right, it's not limited. In Claw, a window object provides a view of a
window; there can be multiple views (via assignment, function return, or the
like). Operations on a view generally are applied to the window itself (such
as being moved or closed). If the last view of a window is finalized, then
the window itself is destroyed.

The advantage of non-limited windows should be fairly obvious: it's possible
to pass a window as a parameter and save it somewhere. This is especially
useful for passing windows to tasks at start-up (each task can have it's own
window to write into).

None of this requires any explicit access types as the client level - Claw
itself manages these as needed. And that means no explicit storage
management is needed, either.

Randy,