[net.cse] pascal as an intro language

hgoldber@polyob.UUCP (A1 harry goldberg ) (02/17/86)

am interested in hearing pros and cons about using pascal as the 
flanguage to teach introductory programming to freshmen (ug's and grad's
pleez respond directly to my login 
iguana!polyof!polyob!hgoldber
*** REPLACE THIS LINE WITH YOUR MESSAGE ***

perry@leopard.UUCP (Perry S. Kivolowitz) (02/21/86)

I believe Pascal is a good first programming language. However, it has
been my experience that undergraduates trained only in Pascal have had
their imagination destroyed. 

I would suggest that Pascal be used as an introductory procedural lan-
guage to be replaced in the second year by C. To go one step further I
would replace C in the  third  year  of study with C++ to get students
used to the idea of  non-procedural languages (there can be an object-
oriented to C++ sources).

Overall, I'd like to less emphasis  on Pascal. It is a dry, uninspired
language suitable for use in introductory courses or very highly main-
tainable but non-the-less uninteresting applications.

I'd like  to  see  non-procedural  languages introduced. That's my big
wish if I had it to do all over  again.  It's real hard after 11 years
of procedural languages to break out of that mind set.

Perry S. Kivolowitz

lamy@utai.UUCP (Jean-Francois Lamy) (02/24/86)

In article <156@leopard.UUCP> perry@leopard.UUCP (Perry S. Kivolowitz) writes:
>I would suggest that Pascal be used as an introductory procedural lan-
>guage to be replaced in the second year by C. To go one step further I
>would replace C in the  third  year  of study with C++ to get students
>used to the idea of  non-procedural languages (there can be an object-
>oriented to C++ sources).

Huh? C++ (or object-oriented languages) are hardly "non-procedural".

At Universite de Montreal Pascal has been used since the early 70's
to teach computer science majors.  It has never been used alone though.

The program lasts three years (our first year students would be sophomores in
the U.S. - we have one extra year of school before university)

At the present time, Pascal is used for the first semester, and is covered in
its entirety (i.e. pointers et al.).  Ada is used in the second term.  Second
year students get exposed to low-level programming on micro computers
(assembly language and C), but the data structures and algorithms courses
still use Pascal.  They also get a dose of object-oriented languages since the
simulation courses are taught using Simula.  Third year students can get a
taste of Prolog or Lisp if they choose an AI course, and quite a few
bachelor's thesis are implemented in C.

Introductory courses for the "general public" (electives and minors) are
taught using Pascal on a bunch of dedicated PCs.  No complaints there
(Turbo Pascal is fast enough for 300 lines max.).

In my experience Pascal is quite appropriate as an introductory language
because it allows the students to concentrate on a few control structures.
However, it should not be used exclusively because it lacks support for
modular programming (NOT because it stiffles imagination - imaginative
assignements can produce imaginative programmers).  Using Pascal and Ada
allows us to drive home the structured programming gospel before putting the
students in situations where they get the opportunity to really screw things
up.
-- 

Jean-Francois Lamy              
Department of Computer Science, University of Toronto,         
Departement d'informatique et de recherche operationnelle, U. de Montreal.
CSNet: lamy@toronto       UUCP: {ihnp4,utzoo,decwrl,uw-beaver}!utcsri!utai!lamy
EAN: lamy@iro.udem.cdn    ARPA: lamy%toronto@csnet-relay

ladkin@kestrel.ARPA (Peter Ladkin) (02/25/86)

In article <156@leopard.UUCP>, perry@leopard.UUCP (Perry S. Kivolowitz) writes:
> I believe Pascal is a good first programming language. However, it has
> been my experience that undergraduates trained only in Pascal have had
> their imagination destroyed. 

Poor Wirth! And this was exactly contrary to his intent. If he couldn't
succeed, would anyone else dare try?

> I would suggest that Pascal be used as an introductory procedural lan-
> guage to be replaced in the second year by C. [Then C++].

Reality will unfortunately intervene. Languages are a tool, not an end.
Of course, it's always helpful to be multilingual. But not compulsory.

> Overall, I'd like to less emphasis  on Pascal. It is a dry, uninspired
> language suitable for use in introductory courses or very highly main-
> tainable but non-the-less uninteresting applications.

How things change! I thought Wirth's Algorithms book was a landmark.
But then, we were comparing it with MIX.

> I'd like  to  see  non-procedural  languages introduced. 

Some have suggested LISP as an appropriate start, like Touretsky.
Nowadays, though LISP is hardly non-procedural, unless you stick
to pure LISP. And it doesn't have typing or other protection
facilities. You say, which LISP am I talking about? Enough said.

Does anyone have any candidates?

Peter Ladkin

eugene@ames.UUCP (Eugene Miya) (02/28/86)

I know there are at least three other members of the Usenet who
sat on the Pascal Standards Committee when I did.

I've read several comments about what should be taught as well as
"Yes Pascal is a good teaching language."  I would qualify the
latter.  It was a decent 1970s teaching language.  Based on my ideas
about teaching programming [like those I mention from other letters]
such as "algorithmic thinking" and "problem solving," I no longer
think it's a good programming language for teaching.

Programming languages are too low-level.  I thought about attacking the
introductory programming language problem using a set of restricted
shell commands, pipes, and &'s to cover some of the issues of programming:
conditions and branching, sequential things, and parallelism (protection
of data, side effects and such).  I've heard that UCB was using AWK
as a first language.  We need a better environment to teach in.
Teaching a person about programming graphics for instance is done at
too low a level.  Note I said nothing about graphics or interfaces,
and performance (the ability to time a pipeline is certainly possible) in
my description of a teaching workbench(?), but these are the types of
things an introductory programming environment should now incorporate
(if this sounds like Smalltalk-80(tm), I want to go beyond that).
Interaction is important, to a degree, so are performance and functionality.

From the Rock of Ages Home for Retired Hackers:
--eugene miya
  NASA Ames Research Center
  {hplabs,ihnp4,dual,hao,decwrl,allegra}!ames!aurora!eugene
  eugene@ames-nas.ARPA
General disclaimer: the above are the opinions of the author and not
the Center or Agency.  Any mention of commerical products does not
constitute an endorsement and is only mentioned as a point of reference.

Obvious trademarks:
Smalltalk-80 is a trademark of Xerox Corp.
Xerox is a trademark of Xerox Corp.

rb@ccivax.UUCP (rex ballard) (03/06/86)

In article <111@polyob.UUCP> hgoldber@polyob.UUCP (A1 harry goldberg ) writes:
>am interested in hearing pros and cons about using pascal as the 
>flanguage to teach introductory programming to freshmen (ug's and grad's

As an introdutory language, pascal offers fairly good type checking, and
is very strict.  At least they won't be "debugging" for syntax errors.
Also, good design techniques are generally included with these courses,
although Yourdon should also be included.

Ideally, a language as structured and strict as pascal should be made
interactive (interpreter?) so that students can experiment with smaller
modules and build up to a working implementation.  This is about the
only good thing I can say about BASIC.

I've used BASIC to teach 8 to 18 year olds, and the advantages of being
able to test a small routine before integrating it into the larger
program can be a valuable educational benefit.  The important thing to
remember about BASIC is to stress structured concepts (gosubs, if then,
for next, while do (if available)) before letting the student
experiment with goto's.  Most students have learned BASIC (and some bad
habits) before they get to college.

It would be nice if students could be taught Pascal in high school as well.

Nuff said about that.

In terms of longer program that gives a balanced education, Pascal
should be followed by:

Assembler - to teach the principles of the actual machine operations.
	Ideally, this should even include a very general background
	in how the micro-code interpreter works.  This helps the
	student to understand how the computer works.

Forth - Interactive nature and "bottom up implementation" along with
	several other constraints of the language can lead to some
	good habits and design techniques.

SmallTalk or some other object oriented language - this teaches organizational
	techniques and principles that can be used in other languages.

C - If preceeded by these other languages, the student is able to take
	advantage of the flexibility of this language more effectively.
	At this point, if they know the rules and principles, students
	can break them (sparingly) in C without the compiler shutting down.