[Python-ideas] binding vs rebinding

Curt Hagenlocher curt at hagenlocher.org
Fri Feb 6 21:04:17 CET 2009


On Fri, Feb 6, 2009 at 11:43 AM, Scott Dial
<scott+python-ideas at scottdial.com> wrote:
> Marcin 'Qrczak' Kowalczyk wrote:
>> 1. Java - split
>> 2. C - split
>> 3. C++ - split
>> 6. C# - split
>
> Are you counting the implicit lack of a binding as a binding? "int x;"
> does not bind anything to "x", technically the first time "x = ..."
> appears is the first binding. Maybe I am splitting hairs, but this whole
> topic is a hair splitter.

Java and C# will always bind a default value on the declaration (even
without the "="); C++ sometimes does, and C never does (at least not
according to whichever standard I vaguely remember).

But there's not really any point in discussing this as a language
feature independently of scoping, and none of these languages have
scoping semantics that are a good match for Python.

--
Curt Hagenlocher
curt at hagenlocher.org



More information about the Python-ideas mailing list