[comp.edu] first languages

lamaster@pioneer.arpa (Hugh LaMaster) (08/24/87)

In article <1039@bsu-cs.UUCP> neubauer@bsu-cs.UUCP (Paul Neubauer) writes:

>Actually, the reason that *I* would tend to favor Pascal over either C or
>LISP as a first language (in spite of its screwy use of semicolons) has more
>to do with its size (not too large) and its reasonably good type checking.  I
>am not impressed by the counterargument that Pascal is not what they will be
>using "in the real world".  After all, a first language is exactly that -- a

I would argue that the reason Pascal is not frequently used in the "real
world" of systems programming is because of a serious problem that the
(non-extended) language has: lack of modularity.  Those who have done either
systems programming or programming of large applications know how important
modularity is.  C, Fortran, and Modula-2 have all been used successfully as
systems programming languages.  For those gasping at seeing Fortran included
in this list, I will point out that Fortran plus bit field manipulation
functions have been successfully used in a number of operating system
projects.  I also don't think there is as much difference between Fortran and
C as is currently thought by a lot of people.  Pascal is woefully inadequate
as a modular language, and has many counterintuitive features that are
artifacts of its origins on systems where the paramount goal was a small
memory, very fast, very simple compiler.

Back to the original question:

A teaching language ought to contain support for the most frequently used
concepts in programming.  Modula-2 probably has the best combination of
support for modularity, nested procedures, information hiding, &etc., so my
guess is that it would be the best teaching language of the procedural
languages.  If anyone out there has used it as a first language for teaching
an introductory programming language, your experience would be welcome.  LISP
is reasonable for a functionally oriented language.  LOGO has gotten same rave
reviews for an object oriented language, but I am not familiar with it.






  Hugh LaMaster, m/s 233-9,  UUCP {seismo,topaz,lll-crg,ucbvax}!
  NASA Ames Research Center                ames!pioneer!lamaster
  Moffett Field, CA 94035    ARPA lamaster@ames-pioneer.arpa
  Phone:  (415)694-6117      ARPA lamaster@pioneer.arc.nasa.gov


                 "IBM will have it soon"


(Disclaimer: "All opinions solely the author's responsibility")

neubauer@bsu-cs.UUCP (Paul Neubauer) (08/26/87)

In article <2575@ames.arpa>, lamaster@pioneer.arpa (Hugh LaMaster) writes:
> In article <1039@bsu-cs.UUCP> neubauer@bsu-cs.UUCP (Paul Neubauer) writes:
> >am not impressed by the counterargument that Pascal is not what they will be
> >using "in the real world".  After all, a first language is exactly that -- a
> 
> I would argue that the reason Pascal is not frequently used in the "real
> world" of systems programming is because of a serious problem that the
> (non-extended) language has: lack of modularity.  Those who have done either
> ...  Pascal is woefully inadequate
> as a modular language, and has many counterintuitive features that are
> artifacts of its origins on systems where the paramount goal was a small
> memory, very fast, very simple compiler.
> Back to the original question:
> A teaching language ought to contain support for the most frequently used
> concepts in programming.  Modula-2 probably has the best combination of
> support for modularity, nested procedures, information hiding, &etc., so my

Now this is a good argument.  In fact, I happen to agree that Modula-2 is a
neat language.  It does have reasonably good support for those very
important concepts.  I have seen too many students complete degrees without
having *any* notion of modularization.  ("Link?  It's just another
mysterious thing I have to do before I can run my program.")  Modula-2 (or
Ada) would force students to come to terms with modular programming, and
that has to be a good thing.  The question is:  Is that something you want
to make them do on DAY ONE?  I am not necessarily saying that it is not,
but, somebody out there, what do YOU tell YOUR students on the first day
when they have to IMPORT (M-2) or instantiate (Ada) their IO procedures?
("I'll tell you what you are doing next semester" just doesn't cut it.)

I will say again:  a first language is not (should not be) a last language.
Any CS major (and that IS what we are talking about here) had better learn
several languages at least passably well before getting a degree.  I really
do think that Wirth had the (or at least a) right idea here.  The idea being
that for the FIRST course, students ought to learn a language that will not
immediately overpower them with details.  We can then hope that they may
even learn something about problem-solving and algorithms and top-down
design.  Pascal's compilation efficiency is also a MAJOR advantage.  Think
about how often beginning students recompile their programs and the effect
that can have on system performance (especially if YOU also have to use the
same system :-).  Pascal is obviously not perfect, but (with apologies)
TANSTAAPL (There Ain't No Such Thing As A Perfect Language).  That's why
there has to be a second (+ third + ...) language.

-- 
Paul Neubauer 	UUCP:  {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!neubauer

lewis@rocky.STANFORD.EDU (Bil Lewis) (08/26/87)

Posting-Front-End: GNU Emacs 18.36.1 of Fri Feb  6 1987 on rocky (berkeley-unix)



[My first entry to any usenet group... ]

I have been teaching the Lisp course here at SU for the past year.
It's been ``demoted'' to a course number of 022 (which puts it
somewhere below ``Computers for Cretins'').  I have had all sorts in
this course, from sophmores to 4th year grads in CS, EE, Linguistics,
Education, Philosophy, etc.  Some of these kids have next to no
programming experience, some have several years (some of these
``kids'' are also older than I am :-).

I had the very good fortune to have some TI Explorers that were given
to us & which weren't being used much (cf. donations to big name
schools).

With that as background, I would like to claim that I have found Lisp
to be a superb first language for my students.  I feel quite strongly
that by having a language as clear and concise as Lisp, with such
obvious semantics, the students' work is vastly reduced and the amount
of learning is proportionally increased.

A portion of this is due to the fact that there are no nasty little
syntax bugs popping up when the program gets compiled.

A portion of this is due to the fact that *everything* is right in front
of the student.  What was the value of that variable?  Look at it!  What
happened to the contents of that array?  It's still there.

A portion is due to there being no core dumps and no debuggers which
require the student to learn another new language at the same time.

Most of it, however, is due to Lisp being so clean, syntatically &
semantically, so that the student can really understand everything.

			****************

Well, that's some claim.  Here's some supporting evidence:


* All of the students could write significent recursive functions.

* (Some of) the students could write the Y-combinator on the final.

* All of them could write macros (only about 1/2 could deal with
  really significent ones, getting all the gensyms right).

* Most of them could explain the implementation of lists, symbols, and
  arrays, show how the garbage collector worked, and support a case for
  optimizing out tail recursion.


I consider this to show considerable knowledge of CS  ---  far more than
I am aware of students showing in other introductory courses (I sure
didn't know 1/4 of this after one quarter!).

Sure, the students are pretty good here.  I am a fantastic teacher too ;-)
Having good machines doesn't hurt, but the real power is in the language.
Once you really understand how something simple works, it's a hell of
alot easier to figure out the hard stuff.

-Bil

(Does USENET know the smiley face convetions?  Turn sideways and interpret
as humor/irony :-)
-- 
Yours sincerly, -Bil 
(aka Weird Bil)

gwl@rruxa.UUCP (George W. Leach) (08/26/87)

In article <2575@ames.arpa>, lamaster@pioneer.UUCP writes:
> 
>   [Stuff deleted.....]
> Pascal is woefully inadequate
> as a modular language, and has many counterintuitive features that are
> artifacts of its origins on systems where the paramount goal was a small
> memory, very fast, very simple compiler.
>
       I for one find that specifying the main procedure as the last
component in the program and specifying procedure/function declarations
prior to their usage is awkward when one is trying to teach top-down
decomposition!  I realize that some strains of Pascal have forward
referencing and/or seperate compilation, but for the introductory
student something simple is required.  I understand the original
concept of a single pass compiler dictated this convention.  In the
days when I ran my own deck of cards through the card reader and
waited for the output I could see this, but with PC-based compilers
I don't.

> 
> 
>   Hugh LaMaster, m/s 233-9,  UUCP {seismo,topaz,lll-crg,ucbvax}!
>   NASA Ames Research Center                ames!pioneer!lamaster
>   Moffett Field, CA 94035    ARPA lamaster@ames-pioneer.arpa
>   Phone:  (415)694-6117      ARPA lamaster@pioneer.arc.nasa.gov
> 

George W. Leach

Bell Communications Research      New Jersey Institute of Technology 
444 Hoes Lane       4A-1129       Computer & Information Sciences Dept.
Piscataway,  New Jersey   08854   Newark, New Jersey   07102
(201) 699-8639

UUCP:  ..!bellcore!indra!reggie
ARPA:  reggie%njit-eies.MAILNET@MIT-MULTICS.ARPA

From there to here, from here to there, funny things are everywhere
Dr. Seuss "One fish two fish red fish blue fish"