merits of Lisp vs Python

Ken Tilton kentilton at gmail.com
Sat Dec 9 12:54:49 EST 2006



Steven D'Aprano wrote:
>  Some languages are too expressive.

:)

> Look, all snarkiness aside, it just isn't true that "stuff like this is
> impossible in other languages". If Wolfram Fenske had said "stuff like
> this isn't easy in many other languages" he would have been right.

Remember, Lisp macros are like being able to run a preprocessor on an 
ad-hoc basis. Without Lisp compilers (er, should I say the Lisp 
"reader"?) understanding macros and macro functions, not even Lisp could 
transform source code this way.

We won't have an intelligent discussion on macros until this gets better 
understood. Macros are not about what one can do at run-time, they are 
about what happens at compile time. If your compiler/preprocessor/IDE 
are not going to cooperate, then embedding a preprocessed language in 
Python is so hard as to be unfeasible.

I also would not quibble over "impossible" vs. "incredibly hard". The 
bottom line is that at a pretty low level hard becomes "aint gonna happen".

> And if
> he had said "and stuff like this carries risks as well as benefits" he
> would have come across as less of a language fanatic.
> 
> One of the risks with Python is the ease with which you can modify the
> built-ins. An expression like list(2, 3, 4) doesn't necessarily create a
> list from 2, 3, and 4, because the built-in list could be redefined.
> (In practice, that's not often a real problem, because experienced
> Python developers simply learn not to needlessly or confusingly shadow
> built-ins.

Well, duuhhhhh. This the Great Strawman, that Lisp programmers (a) love 
having a powerful language (b) so they can produce unreadable code. This 
nonsense is an implicit concession that you have no point at all.

> It's not the best system, but it works well enough in
> practice.) But at least the basic syntax and keywords of the language are
> known to be constant. 
> 
> With Lisp macros, even that isn't guaranteed. Now, if Lispers would say
> "Oh yes, macros give you great power, and with great power comes great
> responsibility. Be careful." 

I have to admit you are probably still catching up on what I have 
written today.

> then, no doubt, we'd take you guys more
> seriously. But we don't hear that -- we hear Lispers going on and on about
> how great it is that they can easily redefine every corner of the
> language.

You have this tendency as your paragraphs grow to get sillier and 
sillier and make up more and more hobgoblin crap, I suppose as you sense 
the weakness of your case. Can you point to where someone said that? No, 
of course not. Get a grip, will you, this could be a useful cultural 
exchange, but not with your hysterics.

> why do you need
> macros then if you are just using them as functions? Why not use functions?

Hint: famous Lisp style rule: never use a macro where a function will do.

Not sure it is worth wasting more time on you at this point or I would 
offer examples. Could you calm down a bit and stop making things up?

ken

-- 
Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

"Well, I've wrestled with reality for thirty-five
years, Doctor, and I'm happy to state I finally
won out over it." -- Elwood P. Dowd

"I'll say I'm losing my grip, and it feels terrific."
    -- Smiling husband to scowling wife, New Yorker cartoon



More information about the Python-list mailing list