A question on modification of a list via a function invocation

Steve D'Aprano steve+python at pearwood.info
Fri Aug 18 20:22:25 EDT 2017


On Fri, 18 Aug 2017 10:36 pm, Rustom Mody wrote:

>> So what abstraction do you think call by object sharing is making, and in
>> what way does it leak?
> 
> Data Dependency — also called coupling — is generally considered to be
> deleterious to software quality

Excessive coupling. You cannot avoid some coupling, nor would you want to. The
whole purpose of programming is to couple your input and your output.

But yes, excessive and inappropriate coupling between parts of your code that
shouldn't be coupled is THE big evil in software development.

> Python removes the frank pointers of C (like) languages
> It does nothing about aliasing

Doesn't it?

> Sharing-by-object is nothing more than the diginification of aliasing

Is it? How so?


In any case, I have to repeat my question since you didn't answer it.

What abstraction do you think call by object sharing is making, and in what way
does it leak?

You made a statement that it is a leaky abstraction, not that it is
insufficiently vigorous in rooting out coupling branch and stem. That's a
separate criticism.




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list