[comp.edu] First Language Taught in CSC de

bernhart@convex.UUCP (07/30/87)

Why is Ada unsuitable as a first programming language?  (Beware of using
the word "clearly" - what's clear to you may not be so clear to everyone
else.)

				Marcia Bernhardt
				Ada Product Specialist
				Convex Computer Corporation
				701 N. Plano Rd.
				Richardson, TX  75081

mazumdar@sunybcs.uucp (Jin Mazumdar) (08/07/87)

In article <69300001@convex> bernhart@convex.UUCP writes:
>
>Why is Ada unsuitable as a first programming language?  (Beware of using
>the word "clearly" - what's clear to you may not be so clear to everyone
>else.)
>
>				Marcia Bernhardt
>				Ada Product Specialist
>				Convex Computer Corporation
>				701 N. Plano Rd.
>				Richardson, TX  75081


1)	Ada is a huge language.  Students learning a computer language
for the first time should not have to deal with remembering a lot of
syntax.  If one limits the course to teaching a subset of ADA why not
teach another language.

2)	Maybe there are fast ADA compilers.  My experience with ADA
compilers is limited, but the one we have is very slow.  A large languge
will compile slow?  Are there ADA interpretors?  Are they friendly?

3)	After gaining exposure to a few languages like Pascal (which
can be learnt with relatively less pain) ADA is just an extension.

				.
				.
				.

ronald@csuchico.UUCP (08/10/87)

In article <69300001@convex>, bernhart@convex.UUCP writes:
> 
> Why is Ada unsuitable as a first programming language?  (Beware of using
> the word "clearly" - what's clear to you may not be so clear to everyone
> else.)

Marcia,
	Ada isn't exactly unsuitable, it's just that there are many other
good choices for a first programming language.  I believe that this is the
jist of the current "first programming language" banter.

-- 
Ronald Cole				| uucp:     ihnp4!csun!csuchic!ronald
AT&T 3B5 System Administrator		| PhoneNet: ronald@csuchico.edu
@ the #_1_ party school in the nation:	| voice     (916) 895-4635
California State University, Chico	"It's O.K." -Hal Landon Jr., Eraserhead

putnam@thuban.steinmetz (putnam) (08/10/87)

I think that a first college level programming course should teach a
programming language for about the same reason that children are
taught arithmetic before they are taught algebra.  The concrete is
usually needed as a kind of scaffolding with which the abstract may be
constructed.  Having a programming language as a source of examples and
a method for describing algorithms is essential to being able to teach
more advanced parts of computer science.  

When deciding which language to use, it is useful to describe some of 
the qualities that such a language should have.  Here is a brief list
of what i consider desirable qualities for a first programming language.

1) simple syntax.  Although describing more complex syntax may be useful
in discussing compilers, it is only an impediment to actually learning a 
language.

2) algol'ish.  There are many languages that are not generally algol'ish
that are useful and worth considering and using, but many of the generally
used languages do fall into this category and many of the other languages
can best be considered experimental.  Students should certainly be exposed
to these languages, but a survey course is probably more appropriate than
a first programming course.  I would tend to include LISP here, though
it may belong elsewhere, but Common Lisp certainly looks a good deal like
most algol family languages.

3) Good control structures.  Provision for if-then-else, while's, recursion...

4) simple environment.  This has two parts. First the language should not
include too many functions that are built in, this is a flaw with Common
Lisp and with many Basic's.  Further, the language shouldnt have a lot
of "magic" - that is features that are more or less tacked on to fill in
the cracks.  A prime example of this (for me, anyway) is Pascal IO.

5) data structuring.  The ability to define structures.  Most modern languages
do include this, but there are the occasional oddballs.

6) Modularity.  The language should support at least limited modularity.  

7) some macro facility.  This is primarily for pedagogical reasons.  I think
it is important to be able to note the difference between things dont in
a preprocessor, in the compiler, and at run-time.  I say this because i have
noticed a good deal of confusion about this in students.  This is one good
point about many assemblers.

8) Common Use.  It would be convenient if the language were sufficiently 
common to have code available for the students to read and modify as exercises.

9) Graphics.  I think that as part of a teaching language graphics are 
important as looking at a picture can give immediate feedback that something
is wrong with a program.  

So, given the criteria above, how do some languages stack up?

1) Pascal.  Standard Pascal lacks reasonable modularity - but many
Pascal's include it in some way.  There is no preprocessor.  The
syntax (do i really need a semicolon here?) is odd.  The IO is
terrible.  However, i have heard of a course taught with a minimimal
Pascal with only single character IO and only characters as data
types.  This has a certain appeal as it forces very careful
consideration of algorithms - but not enough to overcome some of the
other problems.  No good simple graphics.

2) C.  C matches many of these criteria (more or less) and I might be
tempted to teach C.  Certainly there is a lot of C code available for
perusal, though much of it is pretty nasty.  However, i would tend to
avoid C for some other reasons.  First, there is already something of
a C chauvinism around, and this can be a problem.  Second, C's syntax
is occasionally odd - though much of the oddities can be used as
teaching opportunities.  Graphics may be available but the packages
tend to be complex (like X).

3) lisp or scheme.  Scheme seems a good choice, to the extent that its
small and reasonably simple.  (the C-scheme available is too big).  I
like its lexical scoping and many of its features.  It lacks a well
defined macro facility (i think - though my documentation may not be
up to date).  Graphics is certainly available.  Common Lisp is too
big.  I hesitate to recommend either because of a certain Lisp
chauvinism too, further, it seems harder for Lisp chauvinists to
decide that other languages have things to recommend them than for C
chauvinists.  On the other hand, Lisp chauvinists are convinced that
Lisp is so wonderful that nobody who knows any other language can ever
learn it - so maybe its a good idea to get it in early.  Another
problem is that once people are used to garbage collection they tend
to forget about the importance of resource allocation and deallocation.

4) Fortran.  Forget it.  Its not hard to learn fortran once you know
another language, but the other way around seems more difficult.

5) Ada.  Ada is _big_ and this is a problem.  It is not insurmountable
though as only some reasonable subset need be taught as a first
language.  The real problem with Ada is that it seems very verbose.  No
standard graphics package.

6) Assembler.  Not algol'ish.  Assembler is useful in that it provides a
good introduction to standard computer architecture - but assembler is
too low a level to be useful in exploring real problems - not that real
problems cannot be done in assembler - just that it takes too much time
for the results.

Of the above list of languages, Scheme seems to be the winner.

  However, there
are a couple languages that are less common and that deserve to be mentioned 
and considered.

1) Algol 68.  Algol 68 has a reputation for being big - but the actual
description of the language is quite small.  Its a very nice language
and might be my preferred teaching language if compilers were only
available.  Its quite elegant and very powerful.  It does not have any
standard graphics package.

2) Postscript.  In particular the Sun implementation in NeWS.  This is
not an Algol family language, but it is a _very_ elegant language and
has built-in graphics.  It has good support for modularity and a nice
object-oriented system has been built on top of raw PostScript.
Further, the NeWS implementation allows multiprocessing and event
handling, and thus provides a quick introduction to the problems
inherent in such things.  Downsides include the relatively large
language and the parameter passing on the stack (though, again, this
is a good teaching opportunity).  

Well, shall we go?  -- jefu (jeff putnam)
Yes, lets go.       -- UUCP: steinmetz!putnam
(They do not move.) -- ARPA: putnam@ge-crd.arpa

ken@argus.UUCP (08/14/87)

In article <989@argus.UUCP>, ken@argus.UUCP (Kenneth Ng) writes:
: 
: The REXX language has 1,2,3,4,5,6, and 8.  It has one data type: 'string'.
: The language was designed several years ago as an exercise in how what
: makes a languages readable.  

Please ignore this, still tracking bug down.