Extending Python Syntax with @

Peter Maas fpetermaas at netscape.net
Thu Mar 11 07:15:39 EST 2004


David MacQuigg schrieb:
> Seems like we need a simple way to extend Python syntax that doesn't
> break existing syntax or clash with any other syntax in Python,
[...]
> @x,y:x*x+y*y    -- anonymous function

Advantage of your proposal:

- easy to extend the language without breaking existing code.

Disadvantages of your proposal:

- The advantage is also a disadvantage: a lowered barrier for
   new semantics could bloat the language definition. Python's
   strength is that it has *few* concepts that are usable in *many*
   places. This could be compromised by your proposal.

- Python is a readable language. lambda says "function literal",
   yield says "generator", @ just says "different". Python would
   be less readable if this notation would be adopted.

Therefore I vote against it.

Mit freundlichen Gruessen,

Peter Maas

-- 
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail peter.maas at mplusr.de
-------------------------------------------------------------------



More information about the Python-list mailing list