[net.lang] Language transitions

mauney@ncsu.UUCP (Jon Mauney) (02/27/85)

From various sources:  "Pascal I/O is defective because it provides
>   - no random access
>   - no way to open a file with a specified name from with the program.
> 	reset(input,'foo') is an extension. It is not in the standard.  
>   - the representation of files other than text is not defined.  This
> 	means that you can't write records onto a tape and expect to
> 	read the tape on a different system.
>   - no way to APPEND to a file, (without copying out its contents,
>     wiping out the file, and putting them back in
>     before the appending)"

These arguments carry little weight with me, but, ever the open-minded type,
I am willing to study the matter before rejecting it.  To that end, I invite
one and all to tell me what languages do provide these features, and how
they accomplish it in a portable way.

Respond by mail, I will summarize for the net.

-- 

*** REPLACE THIS LINE WITH YOUR SIGNATURE ***

Jon Mauney    mcnc!ncsu!mauney    C.S. Dept, North Carolina State University

ndiamond@watdaisy.UUCP (Norman Diamond) (02/28/85)

> From various sources:  "Pascal I/O is defective because it provides
>   - no random access

Fortran-77, PL/I, and Cobol can do this in a portable manner.  (They can
also do it in dozens of non-portable manners, which is irrelevant.)

>   - no way to open a file with a specified name from with the program.
> 	reset(input,'foo') is an extension. It is not in the standard.  

Fortran-77 can do this in a portable manner.  Of course, the file name
(contained in a character string) must be recognizable by the operating
system.  Believe it or not, Fortran beats PL/I and Cobol this time,
because PL/I's "title" option is non-portable and Cobol cannot specify
the actual filename in a "select" statement (at least, not portably).

>   - the representation of files other than text is not defined.  This
> 	means that you can't write records onto a tape and expect to
> 	read the tape on a different system.

That is a demand that all systems should be identical, which is antithetical
to the concept of portability.  You'll never see that.

>   - no way to APPEND to a file, (without copying out its contents,
>     wiping out the file, and putting them back in
>     before the appending)"

In Fortran, you can read to the end of a file and then start writing --
that's only half as bad.  For that matter, the "open" statement might
include positioning information; I don't remember.

Please observe that the C  LANGUAGE  provides none of these capabilities.
If you want to talk about  LIBRARY ROUTINES, they can be added to ANY
language.

-- 

   Norman Diamond

UUCP:  {decvax|utzoo|ihnp4|allegra}!watmath!watdaisy!ndiamond
CSNET: ndiamond%watdaisy@waterloo.csnet
ARPA:  ndiamond%watdaisy%waterloo.csnet@csnet-relay.arpa

"Opinions are those of the keyboard, and do not reflect on me or higher-ups."

rcb@rti-sel.UUCP (Random) (03/04/85)

Try VMS Pascal. It comes closest to a perfect pascal that I have seen.

					Random
					Research Triangle Institute
					...!mcnc!rti-sel!rcb

ee163acp@sdcc13.UUCP (DARIN JOHNSON) (03/07/85)

> Try VMS Pascal. It comes closest to a perfect pascal that I have seen.
> 
When I used VMS Pascal, I really liked it.  However, as far as saying
VMS Pascal is a perfect Pascal, I have to fudge a bit.  It is similar to
VMS FORTRAN in that there are major extensions to the language.  I like
these extensions, but I would think one would fall into the trap of
writing programs useable only on that compiler (I am guilty too).  So
rather than call it a 'perfect' Pascal, I would say it is 'wonderful'
Pascal.  With enumeration I/O, variable length arrays (spent 2 weeks
determining what the manual said and what really happens), initializers,
and other goodies, I might even call it a 'nice Pascal-like language'.

However, if by perfect you meant "just what I always wanted in..."
rather than "comes close to most common standards..." then ignore the
above.

   Darin Johnson