🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #877

Re: Newbie Wants Advice on C-Programming

#877
From: mat
Date: Sun, 27 Dec 1992 03:11
55 lines
2906 bytes
In article <1992Dec25.070024.15672@grebyn.com>, malak@grebyn.com (Michael Malak) writes:
> In article <1hdpluINN1lv@agate.berkeley.edu> faustus@ygdrasil.CS.Berkeley.EDU (Wayne A. Christopher) writes:
> >In article <1992Dec24.172333.7339@grebyn.com> malak@grebyn.com (Michael Malak) writes:

> >> ...  I feel the following must be learned in order:
> >>   1) Pascal, with two semesters experience

> >IMHO, Pascal has nothing useful that C doesn't have, except for array
> >bounds checking.  You you use C++ you can use a vector class that
> >gives you that.

> Pascal has the following advantages over C:
>    1) It has structured syntactic blocks for constants, types and
>       variables.

This is no advantage.

A program is a model: an abstraction expressed in a representation.  The
Pascal seperation of constant, type, and variable classifies the tools of
representation; it is irrelevant within a program.  Would you require a
cook to measure out all the ingredients specified by tablespoons before
measuring any ingredient specified by cups?
 
>    2) It has nested procedures.

True to a point.  See Kernighan's _Why Pascal is not my Favorite Programming
Language_ for the limitations of nested procedures.
 
>    3) Most importantly, the good structured programming professors
>       wouldn't be caught dead teaching C (biggotry in my opinion).

Besides which, people who learn Pascal first seem to take three or four
times as long to learn how to use C pointers as people who don't learn
Pascal at all, and Pascal introduces people to some really poor habits.

The classical Pascal expression of a loop-and-a-half cannot be written
as a while() because Pascal's expression syntax is too weak.  It cannot
be written as a loop-and-a-half because Pascal doesn't allow a `break'
from a loop.  What results is a circumlocution involving more code in
control flow and temporary variable managing than in solving the problem;
worse, one branch of an  if-then  is related to the circumlocution and
one to the problem to be solved.  This is a very bad form of incohesion:

	if not X
		manage the loop
	else
		solve the problem

This seems to me as damaging to potential software designers as BASIC
is claimed to be to potential programmers.
-- 
 (This man's opinions are his own.)
 From mole-end				Mark Terribile

 mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
Technical Details
Message-ID: <1992Dec27.031157.27179@mole-end.matawan.nj.us>
Path: arc1-ca.pugleaf.net!sparky!uunet!mole-end!mat
References: <1992Dec23.220530.15347@netcom.com> <1992Dec24.172333.7339@grebyn.com> <1992Dec25.070024.15672@grebyn.com>

Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
Path: arc1-ca.pugleaf.net!sparky!uunet!mole-end!mat
From: mat@mole-end.matawan.nj.us
Subject: Re: Newbie Wants Advice on C-Programming
Message-ID: <1992Dec27.031157.27179@mole-end.matawan.nj.us>
Organization: :
References: <1992Dec23.220530.15347@netcom.com> <1992Dec24.172333.7339@grebyn.com> <1992Dec25.070024.15672@grebyn.com>
Date: Sun, 27 Dec 1992 03:11:57 GMT
Lines: 55