I’ve always preferred camel caps to underscores when it comes to naming conventions, but I’ve never really known why. Recently I’ve been writing a lot of Python, where the standard is to use underscores for most names, and now I realise why I don’t like underscores. I hope to make my argument for camel caps objective — or, failing that, at least better than the mouth-frothing, religious reactions you normally get in these “X is better than Y” type of discussions.
Archives: July 2012
Why NSOrderedSet Doesn't Inherit From NSSet - A Real‑life Example of the Liskov Substitution Principle
01 Jul, 2012 — Category: Software DesignThere was an interesting question on StackOverflow this morning: Why doesn’t NSOrderedSet inherit from NSSet? It’s interesting because the reason is so easy to miss. I thought it would make a good blog post because it turned out to be a nice, real-life example of the Liskov substitution principle (herein abbreviated to LSP).