Re:Learn to Read Code
by D_Guidi on Thursday June 29, 2017 @10:41AM
(#14663667)
"dispose" sample in the blog is a wrong sample.
IDisposable is a contract, and if someone define this contract, is because this contract should be used.
the fact that the actual implementation is "empty" doesn't mean that this remains true in the future, or in another implementation of the same interface.
so, based on the sample, I can say: don't read the source!
[ Parent
| on HN ]
Re:Learn to Read Code
by mattmanser on Thursday June 29, 2017 @11:30AM
(#14664069)
YAGNI.
Just like the author found out, it's been there years, no-one's used it.
Ok, so remove IDisposable from class declaration and fix compilation issues. My2Cents.
I completely agree. That's what we ended up doing to "remove all those usings." I do admit it was poorly phrased.
Re:Learn to Read Code
by default-kramer on Thursday June 29, 2017 @10:47AM
(#14663718)
I just wrote a similar comment but I think yours is better. "Contract" is a great word to use here.