The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

Chris Angelico rosuav at gmail.com
Sat Mar 12 17:19:18 EST 2016


On Sun, Mar 13, 2016 at 9:10 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Chris Angelico <rosuav at gmail.com>:
>
>> I completely agree with you that the keyword should mean "write-once"
>> or "never rebind".
>
> That would be possible. I'm afraid that would result in people
> sprinkling these "constant" keywords everywhere to make the program
> supposedly run faster. -- Something like that has happened with the
> "final" keyword in some Java houses.
>
> That would prevent the ad hoc installation of wrappers, debugging tools
> etc.

Hmm. I wonder if it should be like "assert" - nobody ever should
depend 100% on it, but it's a hint back to the interpreter that you
should never be rebinding this.

ChrisA



More information about the Python-list mailing list