[Raymond Hettinger]
>> Rather than munge existing syntaxes, an altogether new one would be
>> more clear:
>>
>>    self->name = self.metadata->name

[Ben North]
> One thing which comes to mind about this one is that, for C/C++
> programmers, the difference between
>
>   obj.member            and             obj->member
>
> is the interpretation of the thing on the *left* of the dot or arrow,
> whereas the PEP is discussing a new interpretation of the thing on the
> *right* of the dot.

Try not to get hung-up on meanings from other languages.
Any simple syntax will have associations in other languages.
It is more important that we don't create a syntax which already
has strong associations in Python (i.e. curly braces, dots, and square 
brackets).
Those syntaxes would make the language harder to mentally parse.

I would like to give the -> syntax a chance as is it simple
and it is provides a nice visual distinction between closely
related concepts:

    a.name              --    getattr(a, 'name')
    a->name           --    getattr(a, name)


Raymond 
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to