Global namespace (was Re: python libs v lisp coolness?

Kenny Tilton ktilton at nyc.rr.com
Wed Oct 29 12:30:18 EST 2003



Bruce Stephens wrote:

> Kenny Tilton <ktilton at nyc.rr.com> writes:
> 
> 
>>Ville Vainio wrote:
>>
>>>Paolo Amoroso <amoroso at mclink.it> writes:
> 
> 
> [...]
> 
> 
>>>in Python you can do:
>>>import os
>>>files = os.listdir("/root")
>>>
>>
>>Python and Lisp, separated at birth?
>>
>>   (require 'os)
>>   (defparameter *files* (os::listdir "/root"))
> 
> 
> That should be
> 
>     (defparameter *files* (os:listdir "/root"))
> 
> shouldn't it?
> 
> (Single colons let you at exported symbols; double colons let you
> access even unexported symbols.  If I understand things correctly,
> anyway.)

Right, thx. I actually always "use" a package and started my response 
that way, then realized a closer parallel would be just to load the code 
and use a package qualifier to get at the symbol. Wasn't thinking very 
hard when I switched over to the second approach and added the package 
qualifier.

My excuse is (and I'm sticking to it) that I was too pleased with myself 
over my "separated at birth" crack. More support, from GvR:

    http://www.python.org/doc/essays/blurb.html

Wow. s/Python/Lisp/w!

And from http://www.python.org/doc/essays/comparisons.html :

"[CL and Scheme] are close to Python in their dynamic semantics, but so 
different in their approach to syntax that a comparison becomes almost a 
religious argument: is Lisp's lack of syntax an advantage or a 
disadvantage?"

Arnold "Lisp" Schwarznegger and Danny "Python" de Vito?

:)

kenny

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application





More information about the Python-list mailing list