3 ms·
I don't see any sign you're telling the author anything he doesn't already know. At least, it looks to me like his complaint is precisely that using and with a
by colomon 16y ago
I don't see any sign you're telling the author anything he doesn't already know. At least, it looks to me like his complaint is precisely that using and with are awkward solutions, because they break object encapsulation in a particularly ugly way.
Or are you trying to argue that objects should never contain file descriptors or sockets?
- jmillikin 16y agoThe author is arguing that reference counting is superiour to garbage collection, because it provides deterministic resource deallocation. I say this is wrong -- object lifetime and resource deallocation should be entirely separate. He should use with and using(), not depend on a quirk of a particular implementation of the language. If an object's lifetime ends while it still holds an open handle to a resource, this should be considered a programmer error.