[Chicago] "with" considered harmful
Martin Maney
maney at two14.net
Wed Aug 18 04:55:09 CEST 2010
Uhm, well, no, that's not actually what he wrote, exactly, though he
does say this about that:
Instead, the python people, in recent versions, have introduced the
"with" statement, which is really just using() with slightly fancier
semantics. And that's very sad. Down that path lies the insanity
that is .net, with every single object eventually needing to be
manually "disposable," just in case.
I do think he's got hold of something significant here. Back in the
almost prehistoric times when C++ was still Bjarne's baby, not yet
grown up and all standardized, he made an interesting observation about
garbage collection (of the non-deterministic sort). It went something
like this: What's the point of garbage collection? It simulates an
infinite memory (in that you can just allocate some, use it, then
forget about it). And if you actually had infinite memory, you'd
*never* run destructors, because there'd be no reason to waste time
reclaiming unused memory. So when should you expect a gc
implementation to run destructors? ... Yeah, you shouldn't.
Certainly you couldn't ever count on them.
Interesting article. Iron Python cannot be a True Python: discuss
amongst yourselves.
http://apenwarr.ca/log/?m=201008#10
--
The true danger is when liberty is nibbled away,
for expedients, and by parts. -- Edmund Burke
More information about the Chicago
mailing list