From: Yannick Duchêne (Hibou57) on
Hi all and Hi others as well,

My dirty stuff of the day : why is Stream_Access not defined once a time
in Ada.Streams and is instead defined elsewhere multiple times, like in
Ada.Streams.Stream_IO, Ada.Text_IO.Text_Streams,
Ada.Wide_Text_IO.Text_Streams and Ada.Wide_Wide_Text_IO.Text_Streams ?

Isn't it funny design ?

--
No-no, this isn't an oops ...or I hope (TM) - Don't blame me... I'm just
not lucky
From: Randy Brukardt on
"Yannick Duch�ne (Hibou57)" <yannick_duchene(a)yahoo.fr> wrote in message
news:op.vca852lexmjfy8(a)garhos...
> Hi all and Hi others as well,
>
> My dirty stuff of the day : why is Stream_Access not defined once a time
> in Ada.Streams and is instead defined elsewhere multiple times, like in
> Ada.Streams.Stream_IO, Ada.Text_IO.Text_Streams,
> Ada.Wide_Text_IO.Text_Streams and Ada.Wide_Wide_Text_IO.Text_Streams ?
>
> Isn't it funny design ?

Ada 95 didn't have anonymous access returns, so a named type had to be
defined. I suspect that there was no intent that it be used for anything
other than defining the result of these functions -- and there was no intent
that that result be stored: just directly dereferenced and passed to a
stream attribute.

If we were writing it today, I'm pretty sure that no named type would be
used at all. But making a change like that now would be incompatible.

Randy.