3 ms·
Of course being able to read and analyze code is important, but I think the author picked a bad example to make his point. Removing all the using statements wou
by default-kramer 9y ago
Of course being able to read and analyze code is important, but I think the author picked a bad example to make his point. Removing all the using statements would be a bad idea! They don't hurt anything, the verbosity is minimal, and someone could add code to the Dispose() method later. If you are dead-set on changing something, you should make the XReader no longer implement IDisposable. And if the XReader is not under your control, then you should absolutely respect the author of the class by following the correct disposal semantics.
- Mouse47 9y ago>If you are dead-set on changing something, you should make the XReader no longer implement IDisposable. I'm sure that's what he meant...at least I hope
- kbsletten 9y agoYou're correct in your assessment, but the parent is correct in their criticism. I'll try to rephrase, though the particular example is not of particular importance.
- emodendroket 9y agoYeah. If you ever watched any of the old MIT lectures with Abelson, the most fundamental point they make is that it's only possible to make a complex system by essentially treating components as a black box. Having a bunch of crap implementing IDisposable when you don't intend that it should ever be disposed, and then chastising people for not going to the implementation to see that the Dispose method is empty, illustrates a sort of confused mindset.