Thread View: net.lang.pascal
8 messages
8 total messages
Started by Thomas M. Breuel
Sun, 06 Jan 1985 20:51
PASCAL as a system's programming language
Author: Thomas M. Breuel
Date: Sun, 06 Jan 1985 20:51
Date: Sun, 06 Jan 1985 20:51
28 lines
2087 bytes
2087 bytes
The fact that PASCAL has clear semantics and consistent syntax makes it very usable for 'Programming 101'. The fact that PASCAL has also a rich set of data structures and rudimentary mechanisms for modular program design allows it to be used for system's programming as well. The language definition by Jensen&Wirth leaves extensions for integration into a host environment unspecified (although an example is given). All implementations that I have encountered (except for Berkley/UN*X 'pc') provide such extensions, and with them PASCAL is an excellent tool for system's programming. Calling it a 'toy' language is completely unjustified. 'C', on the other hand, is a usable, although a bit outdated, workhorse for architectures very similar to the PDP, VAX, or 68000. Unfortunately, 'C' can be adapted only with great difficulties to other architectures, like the Cyber 173, the DEC-20, &c. (not to be misunderstood, 'C' compilers for these machines exists, it is just that practically no program that Joe Random Hacker produces on a VAX will run on them unaltered). Other problems of the language include that its syntax appears convoluted or counter-intuitive to many people (e.g. "return (fun)(*(fun)rtoi(cdr(def)))();" ), and that 'C' is hard to optimise or adapt to parallel execution. I don't want to start another PASCAL vs. 'C' debate here. Which language you prefer depends mostly on your taste (both of them are Turing equivalent :-). Thomas. breuel@harvard.
Re: PASCAL as a system's programming language
Author: Henry Spencer
Date: Tue, 08 Jan 1985 16:21
Date: Tue, 08 Jan 1985 16:21
11 lines
1039 bytes
1039 bytes
> ... Unfortunately, 'C' can be adapted only with great difficulties
> to other architectures, like the Cyber 173, the DEC-20, &c. (not to be
> misunderstood, 'C' compilers for these machines exists, it is just that
> practically no program that Joe Random Hacker produces on a VAX will
> run on them unaltered).
Actually, practically no program that Joe Random Hacker produces on a
VAX will run on a PDP11 unaltered...
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,linus,decvax}!utzoo!henry
Re: PASCAL as a system's programming language
Author: Gadfly
Date: Tue, 08 Jan 1985 22:52
Date: Tue, 08 Jan 1985 22:52
17 lines
1310 bytes
1310 bytes
--
Perhaps the nicest (in the sense of clean) thing about PASCAL
is the way it bifurcates the universe of objects into pointers
and pointees. It is thus easier to debug monster programs
with monster data structures than is the case with C. Actually,
all PASCAL needs to be a superior systems language to C is a
casting operator, assuming the compiler knows how to optimize
programming constructs like sequential array references.
I can do without the demented precedence of logical operators,
though.
--
*** ***
JE MAINTIENDRAI ***** *****
****** ****** 08 Jan 85 [19 Nivose An CXCIII]
ken perlow ***** *****
(312)979-7188 ** ** ** **
..ihnp4!iwsl8!ken *** ***
Re: PASCAL as a system's programming language
Author: Michael Ellis
Date: Thu, 10 Jan 1985 14:35
Date: Thu, 10 Jan 1985 14:35
29 lines
1920 bytes
1920 bytes
From Ken Perlow: >-- >Actually, all PASCAL needs to be a superior systems language to C is a >casting operator, assuming the compiler knows how to optimize >programming constructs like sequential array references. My experience implementing a filesystem in PASCAL was surprisingly positive given the bias I held toward C at the time. The only deviation from Jensen-Wirth's standard required to transform PASCAL from a toy into a credible language is separately compilable modules. Casting operators can then be written in PASCAL as functions which blindly return whatever is passed to them (the assumption here is that type-checking is ineffective across compilations). Such functions also serve the purpose of C's `&' operator. One still must code assembly routines in order to escape PASCAL's detestable (that word is too mild!) I/O `philosophy'; again, separately compilable modules provide this avenue. The features of PASCAL I miss most when programming in `C' are: 1) The debugging power of PASCAL's subrange types. 2) Notational consistency, especially with structures, arrays and pointers. It's unfortunate that C is irrevocably brain-damaged by the lack of coherence and clarity as regards item (2). -michael ellis
Re: PASCAL as a system's programming language
Author: Ron Natalie <ron>
Date: Thu, 10 Jan 1985 20:32
Date: Thu, 10 Jan 1985 20:32
21 lines
1634 bytes
1634 bytes
> > ... Unfortunately, 'C' can be adapted only with great difficulties
> > to other architectures, like the Cyber 173, the DEC-20, &c. (not to be
> > misunderstood, 'C' compilers for these machines exists, it is just that
> > practically no program that Joe Random Hacker produces on a VAX will
> > run on them unaltered).
>
> Actually, practically no program that Joe Random Hacker produces on a
> VAX will run on a PDP11 unaltered...
> --
> Henry Spencer @ U of Toronto Zoology
> {allegra,ihnp4,linus,decvax}!utzoo!henry
Nobody ever claimed C guarantees that you will your code to portable, but
only that it allows you to write portable code. The thing that makes C
so appealing for system programming is that it allows you to break the
rules. Systems Programmers do not necessarily want to do things in a
portable or even structured manner. They should be of a level of skill
that they know enough to be careful when using the questionable features
of the language.
-Ron
Re: PASCAL as a system's programming language
Author: Ken Montgomery
Date: Thu, 10 Jan 1985 21:02
Date: Thu, 10 Jan 1985 21:02
44 lines
2171 bytes
2171 bytes
[]
>Perhaps the nicest (in the sense of clean) thing about PASCAL
>is the way it bifurcates the universe of objects into pointers
>and pointees.
I've always thought that was one of its most *broken* features.
This bifurcation is ridiculous in the light of such C objects
as pointers to pointers.
> It is thus easier to debug monster programs
>with monster data structures than is the case with C.
Exactly contrary to my experience with ~1000 line programs.
(Not really monsters, but large enough for comparison
purposes...)
> Actually,
>all PASCAL needs to be a superior systems language to C is a
>casting operator,
No pointer arithmetic? Or ability to take the address of a static
object? ACK! The ability to have static headers for linked-lists
in dynamic storage is one of the things I miss most in Pascal.
> assuming the compiler knows how to optimize
>programming constructs like sequential array references.
I prefer a minimum of magic (like global optimizations; these
are an invitation to the compiler to mysteriously break programs).
>I can do without the demented precedence of logical operators,
>though.
Plus the fact that short-circuit evaluation is not required...
>ken perlow
--
The above viewpoints are mine. They are unrelated to
those of anyone else, including my cats and my employer.
Ken Montgomery "Shredder-of-hapless-smurfs"
...!{ihnp4,allegra,seismo!ut-sally}!ut-ngp!kjm [Usenet, when working]
kjm@ut-ngp.ARPA [for Arpanauts only]
Re: PASCAL as a system's programming language
Author: Doug Gwyn <gwyn>
Date: Fri, 11 Jan 1985 23:43
Date: Fri, 11 Jan 1985 23:43
13 lines
1141 bytes
1141 bytes
> 2) Notational consistency, especially with structures, arrays and pointers. > > It's unfortunate that C is irrevocably brain-damaged by the lack of > coherence and clarity as regards item (2). How about explaining what you mean. If you're referring to the equivalence of *(p + i) and p[i] then I have to disagree. Otherwise, what notational inconsistency? Structs (unions), arrays, and pointers are not the same things so what consistency are you asking for??
Re: PASCAL as a system's programming language
Author: DARIN JOHNSON
Date: Tue, 15 Jan 1985 02:04
Date: Tue, 15 Jan 1985 02:04
9 lines
1073 bytes
1073 bytes
I admit the article tended to be heavy handed for Pascal, but the replies needn't throw up all over it. I mean we're professionals here. Since I am equally at home with C and Pascal (and know when to use either) I find it annoying to have people say C or Pascal is THE BEST. However since this myth is taught in many CS classes, this attitude unfortunately will be around for awhile. I'd better leave now since I have to spit my foot out.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads