News for hackers. Stuff that matters.
Re:A bad citizen in Javaland (2006) by jdmichal on Thursday December 03, 2015 @12:54PM (#10671185)
The SOLID principles are all you need to know. [0] Then realize through them that inheritance as generally taught is actually a bad idea and use interfaces instead. Then realize that interfaces are just a weaker version of type classes and reach enlightenment.

[0] https://en.wikipedia.org/wiki/SOLID_%28object-oriented_desig...

Re:A bad citizen in Javaland (2006) by Gibbon1 on Thursday December 03, 2015 @03:12PM (#10672242)
I had this thought recently that inheritance was a bad solution to languages not supporting containers natively. And or a lame attempt at code reuse. (A root class is an API/Service with no versioning)
Re:A bad citizen in Javaland (2006) by rripken on Thursday December 03, 2015 @02:34PM (#10671942)
Is this in reference to the type classes as seen in Haskell or something else? I want to reach enlightenment but I'm stuck in Java for the time being.
Re:A bad citizen in Javaland (2006) by jdmichal on Thursday December 03, 2015 @05:24PM (#10673181)
Yes, as in Haskell type classes. Or Rust traits. Basically, anything that acts like an interface (defines a contract) but allows external definition. So you're not stuck wrapping your Integer in a ShowableInteger just to have an Integer that implements the Show interface.