3 ms·
I used to find these types of articles useful. But now I see them more as dogma. Great engineers don't struggle with things like JavaScript inheritance becaus
by kwamenum86 13y ago
I used to find these types of articles useful. But now I see them more as dogma. Great engineers don't struggle with things like JavaScript inheritance because they understand best practices and trade offs. So in general, I find it more useful to read about best practices and trade offs than "xyz considered harmful" articles that don't present viable alternatives to xyz.
That said whenever I see something on raganwald.com I'll still read it :)
- jonahx 13y agohttps://yourlogicalfallacyis.com/middle-ground https://yourlogicalfallacyis.com/middle-ground The alternative he presented is not to share private state between class and superclass. This really isn't a "know the right tool for the right situation" kind of thing -- it's almost never a good thing. You could accomplish this alternative, among other ways, by: 1. Using composition and delegation. 2. Using mixins, if your language supports them. 3. Using inheritance, but depending only upon your superclass's public interface.