Arrogance and humility are equally bad. One should view both others and oneself exactly in proportion to reality, without distortion.

This article is about something I’ve been thinking about on and off for years, which I finally decided to write about because the narrative surrounding the issue seems far too philosophically homogeneous.

Anybody who has followed my work has probably realized by now that I like to pose provocative thought experiments that question popular assumptions to see how important concepts and nuances are often overlooked. This will be another instance of that.

Continue reading Arrogance and humility are equally bad. One should view both others and oneself exactly in proportion to reality, without distortion.

Programming languages should provide at least two separate switch statement keywords, one for fall through and one for no fall through, instead of forcing one or the other.

Programming languages with switch control flow statements typically seem to either (1) make it so that switch statements have fall through behavior (which is often error prone, since it is the less common use case) or else (2) force switch statements to never fall through. Neither of these choices is the wisest choice though.

There is no actual reason why a programming language should be forced into being artificially handicapped by either of these variants’ weaknesses. Instead, the programming language could simply make two different keywords available for switch statements, in such a way as to clearly indicate which behavior will be the result.

Continue reading Programming languages should provide at least two separate switch statement keywords, one for fall through and one for no fall through, instead of forcing one or the other.

Contrary to popular opinion, implementation inheritance is not a conceptually correct representation of an “is a” relationship in programming.

One of the most common intuitions people have in object oriented programming is that inheritance models an “is a” relationship between objects whereas composition models a “has a” relationship between objects. In the case of composition, this intuition is valid and causes no problems. Unfortunately however, the corresponding intuition for inheritance is actually wrong, despite how extremely popular it is.

The problem is that inheritance only actually models a small subset of possible “is a” relationships, and thus when programmers have the habit of thinking “I should use inheritance!” whenever they see any “is a” relationships the inevitable outcome is nearly always a poorly designed representation of the relationships between the objects being modeled.

Continue reading Contrary to popular opinion, implementation inheritance is not a conceptually correct representation of an “is a” relationship in programming.