Archive | March, 2008

Subtlety hinders grokability

17 Mar

Here’s some nice paragraphs recycled from an old crappy post no longer worth reading.

In C, the conceptual and syntactical distinction between definitions and declarations is blurred. This is a prime example of a misguided attempt at conceptual unity in design.

I think what goes on in designers’ heads is that they spend their time juggling many parts around, mentally banging the parts together to see which fit with which and which overlay the others, and then occasionally, in moments of revelation, the designer sees how parts they were thinking of as separate can be neatly overlayed, interlocked, or even dissolved into one, greatly simplifying the design. A small minority of the time, these revelatory moments really pan out just like they seem they will in that initial flash of recognition. However, most of these moments come to nothing when it later turns out that, upon further reflection, the idea doesn’t really make sense or fit consistently with the rest of the design. Other times, refactoring the rest of the design to fit the revelatory idea actually makes the whole more complicated. Other times, the idea can be accommodated just fine, but the gain is just an illusion: the designer, unhappy with some trade off, finds a solution that seems to dissolve that trade off, but euphoria blinds the designer to some side-effect introduced by his solution; on any other day, this new problem would displease the designer just as much as the problem he’s just solved, but he just isn’t thinking about it at the moment—maybe he’ll notice in a week or two.

I believe the misguided attempts at conceptual unity in C that displease me so are actually partly examples of success: after all, the conceptual unities of C ‘work’ in the sense that (obviously) they comprise a real working language and the sense that the conceptual unities do in fact reduce the syntax (e.g. pointer and array declaration syntax mirrors the syntax for dereferencing and array indexing). Still, these design choices also exhibit the designer euphoria blindness I described: aspects of the design have been simplified, but only by incurring disregarded costs elsewhere. In this case, the costs are to language transparency: these supposed conceptual unities in C are difficult to convey to outsiders because they really only make sense to people who already understand them. Having read many accounts of the C language, I’ve come to the conclusion that many of the traditional stories and vocabulary which C programmers use to talk about the language to each other simply fail to account for what is really going on in the language. Really, this is an unfortunate fact of any area of expertise: the experts are already cognizant of what’s really going on, so it’s fine for communication amongst themselves if their explanations and vocabulary abridge or misrepresent to untrained ears what they’re actually saying, but these inaccurate utterances are profound barriers to the uninitiated.