Families and syntax (fwd)

David Mertz, Ph.D. mertz at gnosis.cx
Sat Nov 16 00:23:27 EST 2002


Paul Foley <see at below.invalid> wrote previously:
|> You keep glossing over the difference between C and C++, but they are
|> not the same thing,

|Hmm.  That's what some of us keep saying about Scheme and Lisp.
|Someone recently called me a crackpot for saying so.  Is it
|not-crackpottery to tell people C and C++ (which are far closer than
|Scheme and Lisp) are not the same thing?

Well...  I think I'm said crackpot-caller.  No offense meant, btw, Paul
(feel free to launch similar allegations to my non-disguised address).

But the allegation was on the equation of Intercal with Java.  Those
seem rather far apart to me.  Much farther than C and C++ or Scheme and
Lisp.

The first principle I would espouse is:  SYNTAX MATTERS!  Really it
does.  I quite sincerely believe that no matter what the whole "Why is
Python popular and Lisp not" thread said, the biggest problem Lisp has
(popularity-wise, but popularity need not be a goal) is syntax.  And,
yes, I also believe that Lisp has parentheses and prefix notation (I
have a half-dozen famous introductions that confirm this belief, and
only some... well, crackpot, asides that dispute it on Jesuitical
reasons).

So on the syntax, we can note the following:

    Lisp    Scheme      Python     C    C++      Java    Intercal
    lots-of-parens      not so many .............................
    prefix notation     mostly infix...................  sentential
    even more parens    indents   { delimiter blocks }   lines
    even more parens    lines     semicolons...........  lines

But on semantic issues, the same patterns exists:

    Lisp    Scheme      Python     C    C++      Java    Intercal
    largely-functional  a little   hardly at all.................
    code-as-data        difficult  not really at all.............
    dynamic typing      yep        very static  difficult  ???
    OOP with work       OOP     procdrl OOP     OOP      procedural
    lots of recursion   a little  smidgeon   less still  I think none
    continuations   old stackless Not a chance...................
    multi-paradigm      yep       No  Painful  Sort-of   less than one

So basically, in every broad category Lisp and its dialect Scheme come
out the same.  Python indeed leans closer to the Lisp side of things
than do other languages.

Now indeed, C and C++ differ in some significant ways.  But they have a
special relationship in the sense the C++ is a superset of C. Well, at
least close.  Almost every valid C program is also a valid C++ program.
In that sense, writing about C/C++ may miss something significant, but
it doesn't quite make "crackpot".

Yours, David...

--
    _/_/_/ THIS MESSAGE WAS BROUGHT TO YOU BY: Postmodern Enterprises _/_/_/
   _/_/    ~~~~~~~~~~~~~~~~~~~~[mertz at gnosis.cx]~~~~~~~~~~~~~~~~~~~~~  _/_/
  _/_/  The opinions expressed here must be those of my employer...   _/_/
 _/_/_/_/_/_/_/_/_/_/ Surely you don't think that *I* believe them!  _/_/





More information about the Python-list mailing list