From: "DuckE" <nospam_steved94@home.com>
Subject: Re: How can I avoid Using a Semaphore?
Date: Sun, 21 Jan 2001 01:28:57 GMT
Date: 2001-01-21T01:28:57+00:00 [thread overview]
Message-ID: <tXqa6.290632$U46.9271836@news1.sttls1.wa.home.com> (raw)
In-Reply-To: 94co6t$v27$1@nnrp1.deja.com
"Robert Dewar" <robert_dewar@my-deja.com> wrote in message
news:94co6t$v27$1@nnrp1.deja.com...
> In article <0Cka6.290338$U46.9207275@news1.sttls1.wa.home.com>,
> "DuckE" <nospam_steved94@home.com> wrote:
> > In my opinion this is one of the weak points of Ada 95. It
> > would have been better to not have the 'input and 'output
> > pre-defined for built in types (as a part of the language)
> > but to include a package for defining these
> > attributes. That way an arbitrary representation of built in
> > types could be used with streams when desired.
>
>
> I don't see your point here. Surely you are not arguing in
> favor of REQUIRING people to define their own stream attributes
> for types, that would be a huge pain for the most common use
> of stream attributes.
No I'm not in favor of requiring people to define their own stream
attributes.
>
> There are two possibilities
>
> 1. You want to control stream behavior on a type by type basis.
> This you can do perfectly fine, by just avoiding built in types
> like Integer, which is good practice anyway, and then define
> the stream attributes to work however you want.
>
> 2. You want to control stream attributes globally (as is
> permitted in GNAT by replacing the System.Stream_Attributes
> unit), but you seem to say in the same message that you do NOT
> like the fact that in GNAT this approach results in the default
> routines applying to everything.
>
I believe there's a third:
3. You want to control stream behavior on a type by type basis for all types
including built in types. You also include a package containing streaming
definitions for built in types that may be included using a WITH statement.
This behavior would be more consistent with operation of functions like
"sin" and "cos" that are not pre-defined, but included in a standard
package.
> It really seems like Ada 95 does EXACTLY the right think in the
> terms you have layed out here, you will have to be a lot
> clearer in making your acase that something is missing. Perhaps
> you can give at least a sketch of what you would like to see.
>
Perhaps I would like to see something like:
package Ada.Streams.Built_In_Types is
--
-- Define 'Input, 'Output for built in types
--
end Ada.Streams.Built_In_Types;
And then in my code I have the control to create:
package Steves_Streaming_For_Built_In_Types is
--
-- Define 'Input, 'Output for built in types
--
end Steves_Streaming_For_Built_In_Types;
> From where I sit, it seems like your problem is reasonable,
> and easily addressed with the current language features, and
> i can't see any addition to these features which would be
> helpful in this particular case.
>
For me it's easier to just stay away from streaming. For one thing, the
behavior is implementation dependent. For another, I have been quite
effective at getting things done without it.
>
> Sent via Deja.com
> http://www.deja.com/
next prev parent reply other threads:[~2001-01-21 1:28 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-13 16:18 How can I avoid Using a Semaphore? (long) DuckE
2001-01-15 1:06 ` How can I avoid Using a Semaphore? Nick Roberts
2001-01-15 3:17 ` Robert Dewar
2001-01-16 3:53 ` DuckE
2001-01-17 15:42 ` Nick Roberts
2001-01-20 18:16 ` DuckE
2001-01-20 19:16 ` Robert Dewar
2001-01-21 1:28 ` DuckE [this message]
2001-01-21 16:04 ` Robert Dewar
2001-01-21 23:23 ` DuckE
2001-01-22 0:28 ` mark_lundquist
2001-01-22 1:51 ` Robert Dewar
2001-01-23 2:36 ` DuckE
2001-01-22 0:35 ` Built-in types (was " mark_lundquist
2001-01-22 1:54 ` Robert Dewar
2001-01-22 16:18 ` mark_lundquist
2001-01-22 17:20 ` Robert Dewar
2001-01-22 23:17 ` Mark Lundquist
[not found] ` <m33deaaeks.fsf@ns40.infomatch.bc.ca>
2001-02-02 22:01 ` Mark Lundquist
[not found] ` <94km00$bv8$1@nnrp1.deja.com>
2001-02-02 22:03 ` Mark Lundquist
2001-01-21 16:53 ` Nick Roberts
2001-01-21 18:24 ` Robert Dewar
2001-01-23 0:21 ` Nick Roberts
2001-01-22 0:16 ` mark_lundquist
2001-01-22 16:51 ` How can I avoid Using a Semaphore? (long) mark_lundquist
2001-01-23 6:02 ` DuckE
2001-02-02 22:00 ` Sucking (was Re: How can I avoid Using a Semaphore? (long)) Mark Lundquist
2001-02-03 1:44 ` Jeffrey Carter
2001-02-03 3:21 ` DuckE
2001-02-05 20:07 ` Mark Lundquist
2001-02-06 7:16 ` Sven Nilsson
2001-02-02 22:18 ` How can I avoid Using a Semaphore? (long) Mark Lundquist
2001-02-03 3:01 ` DuckE
2001-02-02 21:38 ` Niklas Holsti
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox