Re:Google joins .NET Foundation as Samsung brings .NET suppo...
by naasking on Thursday November 17, 2016 @10:26AM
(#12978219)
> Now you find out that updating Toilet objects is somehow expensive and decide to wrap it into a Cache<Toilet>. Unfortunately, Cache also has a flush method, so there will be no compile time error, but functionality is broken now.
This has happened to me exactly 0 times since type inference was introduced in 2007/2008.
You have a Toilet object with a method flush.
Now you find out that updating Toilet objects is somehow expensive and decide to wrap it into a Cache<Toilet>. Unfortunately, Cache also has a flush method, so there will be no compile time error, but functionality is broken now.I agree this problem would also occur when using chained calls (house.getToiled().flush()), but explicit types could cover at least some of the cases.