comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: End_Of_File but not really
Date: Mon, 11 Dec 2006 16:49:46 -0600
Date: 2006-12-11T16:49:46-06:00	[thread overview]
Message-ID: <WsGdnZ5_R87MfeDYnZ2dnUVZ_oupnZ2d@megapath.net> (raw)
In-Reply-To: 4-adnQeuHcj3DubYnZ2dnUVZ_oOonZ2d@comcast.com

"Steve" <nospam_steved94@comcast.net> wrote in message
news:4-adnQeuHcj3DubYnZ2dnUVZ_oOonZ2d@comcast.com...
>
> "Randy Brukardt" <randy@rrsoftware.com> wrote in message
> news:oJednfF3KqVVLOXYnZ2dnUVZ_q-dnZ2d@megapath.net...
> [snip]
> >
> > As I noted before, there is absoletely no chance that this behavior (or
> > any
> > behavior of Text_IO) would be changed, because there's no possible way
for
> > such a change to the compatible. If the program "knows" about the "lost"
> > blank line, it might fail badly if the definition was to be changed. So
it's
> > 23 years too late to fix Text_IO.
>
> Actually... couldn't the "Form" option that is passed to Open include an
> option that changes the end of file behavior?  That wouldn't break old
code,
> but would make new code easier.

I suppose, but it wouldn't help much, because there is no "Form" for
Standard_Input (it's already open). So the behavior of that can't be
changed -- but that's where the worst problem is. So it's not clear that a
new "Form" would be very useful (remember that the default behavior would
still have to be the "bad" behavior).

It's also clear that the bad behavior is inevitable with the current model
of terminators. So we'd need a new underlying model, which sounds like a
mess. Besides, getting programmers comfortable with using exceptions is a
good thing: I/O can fail in many ways other than reaching the end, it's
hardly sensible to write any I/O without some handlers. So I'd be more
inclined to make the End_of_File function Obsolescent - it's much like the
Constrained attribute and specific Suppress (which are already Obsolescent):
it seems like they should work, but they don't.

Net result: it's probably not worth the headache.

                        Randy.






      reply	other threads:[~2006-12-11 22:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07 18:00 End_Of_File but not really Adam Beneschan
2006-12-07 20:17 ` Jeffrey R. Carter
2006-12-07 23:25   ` Adam Beneschan
2006-12-08  0:29 ` Randy Brukardt
2006-12-08 17:02   ` Adam Beneschan
2006-12-08 23:02     ` Randy Brukardt
2006-12-24  0:54     ` Craig Carey
2006-12-26  7:44       ` Craig Carey <research@ijs.co.nz>
2006-12-10  4:57   ` Steve
2006-12-11 22:49     ` Randy Brukardt [this message]
replies disabled

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