Python syntax in Lisp and Scheme

Corey Coughlin corey.coughlin at attbi.com
Fri Oct 10 20:00:48 EDT 2003


You are mostly correct about Japanese, I took a year of it in college
and it is a fairly standard SOV language.  (Like Latin, oddly enough.)
 And I'm sure you're right about RPN vs. PN, I always get those
confused.  Which is kind of the point, really, having studied math
since I was a kid I got used to stuff like  "y = mx + b", can you
blame me if I have an easier time with "y = m*x + b" as opposed to
"(let y (+ (* m x) b))" (Forgive me if the parenthesis on that are
off, the newsreader editor doesn't match them, and maybe I need a
'setq' instead of a 'let' or some other thing, I'm not entirely sure.)
 (And again, is the point getting more clear?)  And thanks for backing
me up on car's and cdr's, I never could understand why a language
ostensibly designed for 'list processing' has such a bizarre way to
reference items in a list.  But is (nth 10 mylist) really as easy as
mylist[10]?  My intuition says no, not really.

Sure, I can appreciate looking at things in different ways, and it is
nice to learn new things and see how they apply.  But if John Grisham
learns Japanese, does that mean he should write all his books in
Japanese?  Or should he stick to English?  I suppose if I were a real
CS guy (I'm actually an electrical engineer, the scheme course was one
of the two CS courses I took in college, so I'm mostly self taught) or
if I worked within a big group of Lisp programmers, I would probably
feel more comfortable with it.  Since I now mostly work as an isolated
programmer for other engineers, and the last language I was using for
everything was C, Python is a huge improvement, and it doesn't give me
too much of a headache.  Sure, it's not perfect.  But there's no way
I'm going to adopt Lisp as a perfect language anytime soon.  That is,
if I want to keep hitting my deadlines and getting paid.  And sure, I
may get comfortable and miss out on cool stuff, but on the upside,
I'll be comfortable.

Oh, and if I'm writing in this thread, I suppose I should comment on
how bad lisp macros are.  Except I know nothing about them.  But it
seems like most languages have dark corners like that, where you can
do thing above and beyond your standard programming practices.  Python
has metaclasses, which give me a headache most of the time, so I don't
really use them at all.  But I seem to get plenty of stuff done
without using them, so it works for me.  If you really have to use
macros in Lisp to get things done, that sounds kind of troublesome,
but it would be consistent, it always seemed like really working well
in Lisp requires you to really know how everything works all at once,
which always kind of struck me as kind of a downside.  But as I said,
I'm not the big CS guru, so Lisp just may not be for me in general. 
Ah well, I suppose I'll get by with Python.  :D

Albert Lai <trebla at vex.net> wrote in message news:<4ullrtrdoq.fsf at vex.net>...
> corey.coughlin at attbi.com (Corey Coughlin) writes:
> 
> > (Not to mention car, cdr, cadr, and
> > so on vs. index notation, sheesh.)
> 
> Yes, that is a real regret.  It should have been useful to support
> a kind of (nth 10 mylist) straight from the Scheme standard library.
> 
> > Using parentheses and rpn everywhere makes lisp very easy
> > to parse, but I'd rather have something easy for me to understand and
> > That's why I prefer python, you
> > get a nice algebraic syntax with infix and equal signs, and it's easy
> > understand.
> > Python is
> > intuitive to me out of the box, and it just keeps getting better, so I
> > think I'll stick with it.
> 
> First, a minor correction: Lisp/Scheme is like (* 1 2) and that is
> Polish Notation or prefix; Reverse Polish Notation or postfix would be
> like (1 2 *).
> 
> From what I heard about the Japanese language I have formed the
> possibly oversimplified impression that it is largely postfix.
> Whereas in English we say "I beat you", they may say something like "I
> you beat".  So I suppose all of the existing programming notations -
> Lisp's and Cobol's (* 1 2) and MULTIPLY 1 BY 2, Fortran's "intuitive"
> 1+2, and OO's one.add(two) - are very counterintuitive to them, and
> they would really like the way of HP calculators, no?
> 
> And I suppose the ancient Romans (and even the modern Vaticans) would
> laugh at this entire dilemma (or trilemma?) between ___fixes.
> 
> Intuition is acquired.  It is purely a product of education or
> brainwashing.  There is nothing natural about it.  And since it is
> acquired, you may as well keep acquiring new intuitions and see more
> horizons, rather than keep reinforcing old intuitions and stagnate.
> Appreciating a foreign language such as Japanese some day is not a bad
> idea.




More information about the Python-list mailing list