[Tutor] lists, name semantics

Joel Goldstick joel.goldstick at gmail.com
Mon Apr 20 00:28:56 CEST 2015


On Sun, Apr 19, 2015 at 6:23 PM, boB Stepp <robertvstepp at gmail.com> wrote:
> On Sun, Apr 19, 2015 at 4:05 PM, Dave Angel <davea at davea.name> wrote:
>> On 04/19/2015 03:08 PM, boB Stepp wrote:
>>>
>
>>> Or is the real point that we are adding an abstraction
>>> layer so we don't even have to think about where objects are
>>> physically stored in RAM?
>>
>>
>> Somebody keeps track, but the address is not necessarily constant, and not
>> necessarily stored in any references.  The references (bindings) are
>> abstract, and the details are unimportant to the user.  For example, the
>> jython system does not use addresses at all.  And an object gets moved
>> around from time to time without its references knowing it.
>
> The last sentence in this paragraph has me intrigued. Why would an
> object, once it has been created, be moved? What practical benefit
> does doing this give?
>
> boB

I'm guessing memory management.  You want to have large contiguous
blocks of memory available for large objects.  If a small object is
surrounded by available memory, you might want to move it to some
smaller empty spot.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor



-- 
Joel Goldstick
http://joelgoldstick.com


More information about the Tutor mailing list