Python syntax in Lisp and Scheme

Rob Hunter rob at cs.brown.edu
Sun Oct 12 17:42:17 EDT 2003


On Sunday, October 12, 2003, at 05:14 PM, David Eppstein wrote:

> In article <mailman.38.1065990895.2192.python-list at python.org>,
>  Rob Hunter <rob at cs.brown.edu> wrote:
>
>>> Wow!  This is the clearest argument against macros I have seen yet.
>>>
>>> These are -exactly- the kinds of difficulties I want to exist before
>>> the
>>> syntax of my programming language can be changed--it should need
>>> committment, effort, and clear and arguable reasons... not be 
>>> something
>>> someone can cavalierly do on an impulse.
>>
>> Let's just all code in assembly.  I shouldn't be able to make a
>> recursive call on an impulse.  It'll be really slow going and so we'll
>> have to think really hard about each line and thus are programs will
>> come out better.
>
> Uh, actually every assembly language I have seen has had macros.
>

Okay, but that is neither here nor there wrt my point.  My point, which 
was perhaps unclear, is that you should *not* make dangerous language 
constructs hard to use.  And the reason, of course, is that all 
language constructs are dangerous.  I can go into a oft used math  
function in my team's project and change it to return a value 1 more 
than it's supposed to, and this would quite possibly be a devastating 
blow to the project (because it might be really hard to detect)---and 
the only language construct I used to deliver this blow was addition!  
I'm pretty sure that addition should be easy to use in any language.

But, indeed, I didn't know that about macros in assembly.  I wonder how 
quickly you could use the macros to turn assembly into a more 
reasonable language, like Python or Scheme.

Rob






More information about the Python-list mailing list