Typed Python?

Jacek Generowicz jacek.generowicz at cern.ch
Wed Jul 7 05:55:02 EDT 2004


Jorge Godoy <godoy at ieee.org> writes:

> On Ter 06 Jul 2004 15:45, Ville Vainio wrote:
> 
> > If you recall, we've got == for comparison in Python and most of the
> > programming world. There is no ambiguity. x=10 syntax is just
> > impossible in Scheme without read macro hackery, because of the
> > s-expression syntax (which does have some virtues).
> 
> I agree, but usig "==" is unnatural and computer specific. (I'm not saying
> that the scheme approach is better.)

Ultimately it's just a choice of names. Whatever names you chose, the
programmer and reader have to understand the meanings of the names. In
Scheme (or other Lisps) you could have made the same choices of names
as in Python:

   (== a b)   ; Compare a and b
   (= a b)    ; bind a to the value of b

But choices of names are a very boring issue, compared to the issue of
code structure, the issue of series-of-token (just about everything)
syntaxes vs hierachical structure syntaxes (s-expressions, XML, sort
of Forth ...)

> Anyway, this is one thing where the s-exp seems less ambiguous.

I think you were commenting on the choice of names ('set!' vs '='),
which has nothing to do with s-expressions.



More information about the Python-list mailing list