[Python-ideas] x )= f as shorthand for x=f(x)

Boris Borcic bborcic at gmail.com
Fri Nov 9 20:37:29 CET 2007


Guido van Rossum wrote:
> Boris, give it up. That syntax is never going to fly. If you have to
> ask why, you're just not cut out to be a language designer.

Guido,

I did not intend to pose as a language designer. I just bumped for the nth time 
on a corner of the language and came up with the closest approximation to a 
solution I could invent, expecting the (actual and potential) language designers 
of the forum to find a better solution if any can be dreamed up. Maybe I was 
mistaken about this newsgroup's purpose, but imho playing the devil's advocate 
is a perfectly honorable manner to push ideas (as opposed to designs).

I must admit I wasn't expecting the discussion to rely so quickly on involving 
my character. In conclusion, I guess I'm warranted to take this to mean "we can 
dream up no appropriate syntax".

Regards,

Boris
---
PS,FYI : a notation borne from letting parens live independent lives,
and indeed could fly http://en.wikipedia.org/wiki/Bra-ket_notation


> 
> On Nov 9, 2007 10:33 AM, Boris Borcic <bborcic at gmail.com> wrote:
>> Steven Bethard wrote:
>>> On Nov 9, 2007 7:39 AM, Boris Borcic <bborcic at gmail.com> wrote:
>>>> Title says it all. Got used to += et al. My mind often expects augmented
>>>> assignment syntax to exist uniformly for whatever transform.
>>> I'm not really a Guido channeler, but I'd guess this has about a 0%
>>> chance of ever making it into Python.
>>>
>>> Function calls in Python are indicated by () following the function
>>> name.  Your proposal puts the parentheses (or one of them) *before*
>>> the function name. Breaking the consistency here seems like an
>>> *extremely* bad idea.
>>
>> I contend that   x )= f   captures some perfume of the invariant you mention,
>> although I admit there is no comparably simple formula for the relaxed invariant
>> (if indeed it exists).
>>
>> Note that current python syntax requires any ) to follow a ( that it balances,
>> so that's not one but two rules broken in coordination.
>>
>> (-1)*(-1)==(+1)-ly yours,
>>
>> Boris Borcic
>> --
>> What happened to our chief humorist and python zen master, BTW ?
>>
>>
>> _______________________________________________
>> Python-ideas mailing list
>> Python-ideas at python.org
>> http://mail.python.org/mailman/listinfo/python-ideas
>>
> 
> 
> 




More information about the Python-ideas mailing list