This is a single archived entry from Stefan Tilkov’s blog. For more up-to-date content, check out my author page at INNOQ, which has more information about me and also contains a list of published talks, podcasts, and articles. Or you can check out the full archive.

Steve Yegge on Static Typing

Stefan Tilkov,

Steve Yegge:

[W]e also know that static types are just metadata. They’re a specialized kind of comment targeted at two kinds of readers: programmers and compilers. Static types tell a story about the computation, presumably to help both reader groups understand the intent of the program. But the static types can be thrown away at runtime, because in the end they’re just stylized comments. They’re like pedigree paperwork: it might make a certain insecure personality type happier about their dog, but the dog certainly doesn’t care.

Long, but well worth the time, as usual.

On February 18, 2008 4:44 AM, Robert Fischer said:

But the static types can be thrown away at runtime, because in the end they’re just stylized comments.

This betrays a deep and grave misunderstanding about contemporary languages. In particular, the wide prevalence of run-time optimizations (most notably, the JVM’s HotSpot runtime) means that the type information can’t be thrown away at that point, because there are additional compilation requirements coming out of the way run time is done.