« Sammanfattning Skånska bloggareträffen 14 augusti 2005 (Malmö) | Main | Spin (kortfilm) »

augusti 16, 2005

Analogi mellan skrivandet av Harry Potter och utveckling av programspråk

Guido van Rossum, grundaren av det trevliga programspråket Python, gör en kort och kärnfull analogi mellan utveckling av programspråk och skrivandet av Harry Potter. (Egentligen gäller detta vilka bok-/film/TV-serier som helst, men Harry Potter är ett namn som slår just nu.)

Från The Harry Potter Theory of Programming Language Design

I'm sure that when J.K. Rowling wrote the first Harry Potter book (planning it as the first of a series of seven) she had developed a fairly good idea of what kind of things might eventually happen in the series, but she didn't have the complete plot lines for the remaining books worked out, nor did she have every detail decided of how magic works in her world. ... Just like the successive Harry Potter books are required to have "continuity" (we can't have Dumbledore's taste in sweets change drastically in book 3), successive versions of Python are constrained by pretty serious backwards compatibility requirements.

Sometimes it's easy to go back and generalize a feature; for example, the transformation of built-in conversion functions like int(), str() and list() into built-in classes feels like a stroke of genius (if I may say so myself :-). On the other hand, the recent discussion on python-dev of the exception hierarchy, summarized in PEP 348, shows that early choices sometimes are less than ideal, even if they're not fatally flawed. The mismatch of naming conventions and API quality in the standard library is another example.

Posted by hakank at augusti 16, 2005 05:56 EM Posted to Systemutveckling