3 ms·
This appears to have been written before IDEs were invented. The author suggests that it's acceptable to extend a class just to gain unqualified access to its
by peeters 15y ago
This appears to have been written before IDEs were invented. The author suggests that it's acceptable to extend a class just to gain unqualified access to its static methods to save a few characters of typing.
- tptacek 15y agoDid you read "Scheme In One Class" at the link he attached to the paragraph you're sniping at?
- peeters 15y agoYes I have, and in that he reiterates that it's just to achieve unqualified access (i.e. save a few keystrokes, which is not an issue with any moderately good IDE): > I came up with the idea of putting the utility methods in their own class, SchemeUtils, and then having the five other top-level classes extend SchemeUtils. That way, I can use the unqualified name, and I get the modularity I want. It's not a huge deal in his project since he obviously wasn't using OOP anyhow, but it really is an abuse of inheritance with no benefit.
- Drbble 15y agoWhat IDE will hide the qualifying class names of method calls? I was searching for that yesterday, but the best I could so is syntax highlighting to make classes display in a very faint color, but Eclipse can't distinguish type declarations from method qualifiers from class declarations, nor will it fold away the class names I want to hide, so it's not ideal. Coding is 10% reading and 90% reading, so an IDE that only helps with writing code is approximately worthless.
- deleted 15y ago[deleted]