[Python-ideas] Making colons optional? Syntactic alternative.
andre.roberge at gmail.com
Thu Feb 5 20:53:35 CET 2009
On Thu, Feb 5, 2009 at 3:33 PM, Chris Rebert <pyideas at rebertia.com> wrote:
> The other somewhat popular choices of assignment syntax that I've seen
> are x := y, x <- y, and let x = y. The first and last of those still
> use a =, albeit with something extra, and so aren't too much of a
> stretch. x <- y is particularly deviant and isn't readable (as in read
> it out loud) IMHO; you either have to read it right-to-left (which is
> unnatural) as "Take y and put it into x", or as "x has y placed into
> it" (which uses the passive voice and so does not fit well with an
> imperative language.
Furthermore, the "take y and put it into x" might be an appropriate
interpretation for C but not for Python. For Python it should be
instead something like
"Assign the name x to object y" which could be visually represented by
x -> y instead of x <- y as you mention.
> Follow the path of the Iguana...
> Python-ideas mailing list
> Python-ideas at python.org
More information about the Python-ideas