12 posts tagged “static-typing”
2026
25+ years into my career as a programmer I think I may finally be coming around to preferring type hints or even strong typing. I resisted those in the past because they slowed down the rate at which I could iterate on code, especially in the REPL environments that were key to my productivity. But if a coding agent is doing all that typing for me, the benefits of explicitly defining all of those types are suddenly much more attractive.
2021
Tests aren’t enough: Case study after adding type hints to urllib3. Very thorough write-up by Seth Michael Larson describing what it took for the urllib3 Python library to fully embrace mypy and optional typing and what they learned along the way.
2018
Datasette unit tests: monkeytype_call_traces (via) Faceted browse against every function call that occurs during the execution of Datasette’s test suite. I used Instagram’s MonkeyType tool to generate this, which can run Python code and generates a SQLite database of all of the traced calls. It’s intended to be used to automatically add mypy annotations to your code, but since it produces a SQLite database as a by-product I’ve started exploring the intermediary format using Datasette. Generating this was as easy as running “monkeytype run `which pytest`” in the Datasette root directory.
Pyre: Fast Type Checking for Python (via) Facebook’s alternative to mypy. “Pyre is designed to be highly parallel, optimizing for near-instant responses so that you get immediate feedback, even in a large codebase”. Like their Hack type checker for PHP, Pyre is implemented in OCaml.
How to Use Static Type Checking in Python 3.6 (via) Useful introduction to optional static typing in Python 3.6, including how to use mypy, PyCharm and the Atom mypy plugin.
2017
Let your code type-hint itself: introducing open source MonkeyType. Instagram have open sourced their tool for automatically adding type annotations to your Python 3 code via runtime tracing. By default it logs the types it sees to a SQLite database, which means you can browse them with Datasette!
2010
Why is Java perceived as not cool for startups? We seem to be getting a lot of feedback lately that a startup should be using Ruby on Rails, PHP, Python, etc., if they want to be agile and iterate quickly.
You should re-evaluate your beliefs. Dynamic language programmers spend a great deal of time thinking about code quality and maintainability. TDD (and BDD), which I believe was first popularised within the Ruby community) are extremely widespread, and profiling and debugging tools are widely used and constantly improved. A strong test suite provides far more effective protection against bugs than static typing and an IDE.
[... 152 words]2008
Static typing in OO languages isn't the solution to software complexity, rather it's an enabler of it. Static typing is like giving a drunk a bunch of breath mints and saying "Don't drive drunk. But if you must, use these breath mints in case you get pulled over."
2007
Size Is The Enemy. Jeff Atwood: “I’ve started a cottage industry mining Steve [Yegge]’s insanely great but I-hope-you-have-an-hour-to-kill writing and condensing it into its shorter form points.” Lots of verbose static typing apologists in the comments.
2004
The Fishbowl: Type Inference and Java. Why Java’s implementation of static typing is stupid.
2003
ML Types Explained
From a link on the mailing list edition of comp.lang.python, this talk on strong typing (in the form of heavily annotated slides) is an explanation of the ML type system and why it really doesn’t suck. From the same thread, Felix is a new high level C++ style language with an ML style type system which looks like it could be worth experimenting with.
Strong Typing vs Strong Testing
In Strong Typing vs. Strong Testing, Bruce Eckel reconsiders the old idea that languages without strong typing can’t be relied on to create large programs:
[... 148 words]