Opening Scenario
You're building a data pipeline. A Python service produces JSON; a Java service consumes it; a C++ service computes numerics for both. Tests pass in isolation. In production, three bugs land the same week:
- A user ID
9007199254740993from the Python service arrives as9007199254740992in a JavaScript dashboard. - A C++ function receives
count = -1from Java, then reads past the end of an array. - A Python server compares a JSON field with
if value:and treats the string"0"as truthy. Later, a Java call site uses"0".equals(value)on the same field and agrees. Everyone disagrees about what "empty" means.
None of these are "bugs" in any one language. They are bugs at the seams — the places where types cross a boundary. You can't avoid cross-language work; you can only learn where the trapdoors are.
Question Progression
Q1: Why do integers stop meaning the same thing across languages?
Question: Python integers are arbitrarily large. Java's…
In the full tutorial
- When to Reach for This