merits of Lisp vs Python
Ken Tilton
kentilton at gmail.com
Sun Dec 10 09:20:51 EST 2006
Steven D'Aprano wrote:
> On Sun, 10 Dec 2006 02:00:02 -0500, Ken Tilton wrote:
>
>
>
>>Steven D'Aprano wrote:
>>
>>>On Sat, 09 Dec 2006 22:41:12 -0500, Ken Tilton wrote:
>>>
>>>
>>>
>>>>>I know that. It was more of a rhetorical question -- Lispers are either
>>>>>trying to emphasis the radical nature of what you can do with macros, or
>>>>>understate it and make them seem just like functions.
>>>>
>>>>Yep, both. The first is rare. CLOS is one, my Cells (ported this summer
>>>>to PyCells as part of SoC 2006) is another. The latter is the norm.
>>>
>>>
>>>If macros' advanced usage is rare,
>>
>>Hunh? I have tons of them. Of coure at your level of discourse you will
>>want to know if those are metric tons or...
>
>
> Stop playing games Ken. You said they were rare. Not me. You. The fact
> that you personally make lots of use of the more radical macros doesn't
> come into it. As you said, the norm across the wider Lisp community is the
> less radical macro, the ones that are basically just functions.
>
> That's what you said -- or are you changing your mind?
No, I simply misapprehended what you wrote, though it was perfectly
clear. You wrote:
> If macros' advanced usage is rare, and most usage of macros could be done
> by functions, then maybe that explains why so many coders don't miss them.
Maybe my brain misfired because there is so much wrong with that. The
meta-wrong is that clearly you do not understand macros or how they play
out in real applications, but you have climbed up on this soapbox as if
you were an expert on both issues. Like your interview, you are
speculating without basis on what might happen. You do have a good
excuse since GvR does the same.
Here you have a chance to talk with people who program with macros day
in and day out and learn about them, instead you are trying to tell us
how they are used. Does that make a lot of sense? Or do you think we are
lying? :)
Language-transforming macros such as defclass/defmethod (the heart of
CLOS) and my defmodel come along rarely. This does not mean my
applications do not /use/ CLOS extensively. They do. It means I do not
have ten such different language extensions. I have three: defclass,
defmodel, and LOOP. Can you understand that difference? "Used everywhere
because they are so cool" and "just a few such cool tools exist" are not
contradictory.
Does rare mean "who needs it"? Nice try, but obviously not. Well, maybe
not obviously, because not everyone likes OO, but I would not want to
program without defclass or defmodel or even LOOP. The latter is such a
powerful iteration tool it justifies learning the new syntax, which is
also not a problem because I use it all day making it is easy to
remember. (Aside: I /did/ resist learning it for years because of the
different syntax--my loss.)
Recall that this subwar started over someone saying Lisp was able to
"grow" CLOS without changing and have it look like part of the language,
which led you and others to echo GvR and pronounce macros to be
obfuscatory (?). Sorry, no, not in fact. Only in your nightmares.
As for simple macros not being necessary, what they do is clean up the
code, letting the beef stand out more. Obviously people with that
interest do not turn around and create obfuscated code, no matter how
many times you want to FUD that (which seems to be quite a lot <g>).
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