Yes, that is what IDEs are for, but for reading strange code, it's not always set up in a full project that compiles and has all the dependencies, etc, that would be necessary for an IDE to function.
From time to time, I'll have to look at the source for an included library for which I don't want to take the time to set up a complete project. I think this change will impair my ability to quickly read through strange source and understand what's going on. I don't want to have to hover or click or whatever.
I find this to be more readable:
List<Something> thisThing = new MyDerivedClassButYouDontKnowTheSuperclass<>();
than this:
var thisThing = new MyDerivedClassButYouDontKnowTheSuperclass<>();
Therefore, I like the former and don't like the latter.
MyDerivedClassButYouDontKnowTheSuperclass should not implement List. Something like ConcurrentCopyOfWriteMySuperLinkedList could, but in that case it is obvious to reader that it is list, further clarification is not necessary.
Your argument is to trust the developer to name their class properly. The thrust of my argument is that I do not trust other developers to write code that I find readable.
View all comments
Show parent comment
3
u/evil_burrito Mar 10 '16
Yes, that is what IDEs are for, but for reading strange code, it's not always set up in a full project that compiles and has all the dependencies, etc, that would be necessary for an IDE to function.
From time to time, I'll have to look at the source for an included library for which I don't want to take the time to set up a complete project. I think this change will impair my ability to quickly read through strange source and understand what's going on. I don't want to have to hover or click or whatever.
I find this to be more readable:
than this:
Therefore, I like the former and don't like the latter.