[net.lang.ada] Text_IO concurrency

harbaughs@EGLIN-VAX.ARPA (09/18/85)

18 Sep 1985
     How could i pass up Dave Bakin's invitation to
speak up. I haven't heard from John Goodenough on
this yet so i'll jump the gun and  put it out for all
to see, shoot at etc.
--
Date: Mon, 09 Sep 85 11:50:13 CDT
From: harbaughs@EGLIN-VAX
Subject: Ada difficulties per your request
To: goodenough@usc-isi
Cc: harbaughs@eglin-vax

John,
--
You decide if this is aprpro to put out on info-ada.
--
The part of Ada that continuously gives me and others a hard
time is text_io. Last Friday 3 of us wasted an hour until
we concluded that text_io is a single thread package and
cannot support simultaneous calls to get and put (one in each
of two tasks). In the recent past I have had difficulty
with while loops which look for EOF and doing a get in
the loop.
--
I think that text_io qualifies for your request of Ada 
things that draw the programmer into erroneous programs
because the implementations of text_io don't seem to
follow the simple explanation in the LRM. Either the
LRM doesn't begin to explain what the validators
will accept or the validation doesn't check what
the LRM says or a bit of both.
--
Philosophically, it is always the interfaces to other
systems that are the biggest difficulty in system design
and text_io is an example of interfacing the Ada language
to (in my case) the VAX VMS and the terminal handler
and the VT100.
--
If text_io is intended to be single thread then perhaps
it should be speced as a task so that it is clear that
only a get or a put will be accepted and processed but not 
both at the same time.
--
regards,sam harbaugh
--------------------