[Python-3000] symbols?

Kendall Clark kendall at monkeyfist.com
Fri Apr 14 18:36:29 CEST 2006


On Apr 14, 2006, at 1:29 AM, Adam DePrince wrote:

> Perl on the other.  Python is sort of in the middle.  The question  
> being
> asked here is "Does using plain strings for symbols make us too much
> like Perl, or will fixing it by introducing a symbol type make us too
> much like Java.

That's a reasonable way of looking at it, I suppose. But note how  
Common Lisp, which defies the Perl-Java language spectrum in some  
sense, uses symbols in lots of ways, none of which I'm suggesting for  
Python. That is, symbols are a really fundamental type in CL, and I'm  
not suggesting that radical an injection of them into Python.

> Personally, I rather like the direction of the symbols idea, but am
> unsure if I like the :symbol form for the literal.  I give it a +0.5.

Yeah, I don't think that syntax really works either. I'm not sure  
*which* syntax works best, but I think the notion of literal syntax  
is less important than whether people are interested in this as a  
language addition at all.

(I decided I don't like the :foo syntax after starting at this for a  
while:

if arg == :GET:
     dispath()

The :foo: is rather ghastly.)

Cheers,
Kendall




More information about the Python-3000 mailing list