[Python-3000] sets in P3K?
Josiah Carlson
jcarlson at uci.edu
Tue Apr 25 18:45:26 CEST 2006
Greg Wilson <gvwilson at cs.utoronto.ca> wrote:
>
> > On Tue, 25 Apr 2006, Raymond Hettinger wrote:
> > Embrace genexps -- they are a path to uniform and clear expression
> > across a wide range of datatypes.
> > ...
> > Avoid punctuation and funky syntax -- they burden the learning curve,
> > they do not generalize well, they challenge parsers (both human and
> > electronic), and they throw-away the clarity affored by spelled-out
> > datatype names.
>
> Hi Raymond,
>
> Do you have any data to back up these assertions? Something like
> http://mail.python.org/pipermail/python-dev/2000-July/006427.html?
Assuming programmer sanity, how can naming the data type in the
construction of the data type be ambiguous? Or really, how could
learning a name be more difficult than learning a syntax? It seems to
be quite clear, if one bothers to read the name, precisely what is being
constructed (assuming the reader understands what a 'set', 'frozenset',
etc. is).
If list comprehensions didn't come first (and even though list
comprehensions came first), I would argue that there should only be
generator expressions. If one wants a list comprehension, one should
use list(genexp). Obviously it would have clear implications of the
non-starting of {genexp} for set, frozenset, and/or dict comprehensions.
This would also make it clear that the Python language isn't going the
way of "a new syntax every release", but rather a language with minimal
syntax to learn and/or get in your way.
- Josiah
More information about the Python-3000
mailing list