[comp.edu] Programming paradigms

lacey@batcomputer.tn.cornell.edu (John Lacey) (08/03/89)

tbc@hp-lsd.HP.COM (Tim Chambers) writes:
<I have seen the merits of Pascal,
<Gosling's Mock-lisp, C, Ada, Objective-C, C++, Smalltalk, Prolog, and assembly
<language debated during my career.  My education allowed me to adapt to
<whatever language my employer has required me apply.

jba@harald.ruc.dk (Jan B. Andersen) writes:
| Agreed. When you have learned an algorithmic language containing these
| concepts, you won't have to learn something totally new, just how to
| 
|   1) write it using another syntax, or
| 
|   2) simulate it, using the available language constructs.
| 
| Prolog and Lisp however, might be more difficult.

I think that Tim was talking about something more abstract than the Algolian
programming style.  That is, once you have learned concepts like abstraction,
modularity, abstract data types, and problem solving in formal notations,
in a couple of different programming paradigms, learning a new notation,
and even a new paradigm, is easy.   If ALL you have learned is Algolian,
then you are correct, Prolog and Lisp might prove difficult.

I think that David Gries' comment, that you program into a language, not 
in one, needs a corollary.  Namely the importance of paradigms, and their
influence upon our thinking.  The following is a brief outline of problem
solving (in the world of programming).

1) Identify the problem.
2) Select an appropriate paradigm.
3) Solve the problem (produce a formal solution).
4) Write the solution in an appropriate notation.

The key is that if step 4 fails, you must return to step _2_, not step 3.
In other words, Gries's edict shows up here as the distinction between 
steps 3 and 4.  My corollary shows up as the distinction between steps
2 and 3, with the caveat that the loop is 2-3-4, not 3-4.

-- 
John Lacey     lacey@tcgould.tn.cornell.edu    cornell!batcomputer!lacey

After August 16:  jjlacey@owucomcn.bitnet
If you have to, try  mdl@sppy00.UUCP or maybe {...}!osu-cis!sppy00!mdl