Extended Type Design.
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Fri Mar 23 15:24:38 PDT 2007
Bruno Medeiros wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>> Derek Parnell wrote:
>>> On Tue, 20 Mar 2007 16:01:35 -0700, Walter Bright wrote:
>>>
>>>
>>>> A symbol is a name to which is 'bound' a value.
>>> ...
>>>
>>>> Here, we bind a new value to the symbol x:
>>>> x = 4;
>>>
>>> I used to use the verb 'to assign' for this concept. I guess that's
>>> still
>>> okay or must I modernize <G>
>>
>> You may want to modernize. "Assign" doesn't quite catch the notion of
>> indirect reference, and from a couple of posts I understand that this
>> is a source of confusion.
>>
>
> Huh, " "Assign" doesn't quite catch the notion of indirect reference",
> what do you mean by that? I too was thinking that "assign" is a much
> better term than "binding".
>
>> A very useful way to see "int x = 4;" is that the symbol x is bound to
>> the Platonic number 4. The 4 itself cannot change. You can rebind x
>> by, say, writing ++x. That unbinds x from Plato 4 and binds it to
>> Plato 5. Once this is clear, the notions of values and references
>> clarifies a lot.
>>
>
> Dear Gods. Yes, that conceptualization is correct, but again, how is it
> any better than "assign"/"assignability"?
>
> A very useful way to see "int x = 4;" is that the symbol x is assigned
> to the value 4. You can reassign x by writing ++x. That assigns x to the
> value x+1.
That is what really happens, but won't help understanding references. So
it is not useful for that purpose.
Andrei
More information about the Digitalmars-d
mailing list