There are moments when a truth in technology reveals itself so clearly that it's impossible to ignore. When the whole world independently arrives at the same conclusion. When the numbers say out loud what you've felt in your code for years.

Duck typing is dead. Types have won. In all languages, in all communities, on all fronts. And I'm thrilled about it, because this path – the path of strong types – was always the right one.

The Prophecy

Monkey patching, duck typing, rejecting dependency injection – all of it grows from the same root. From the conviction that explicit structure is unnecessary. That code doesn't need to say what it expects and what it returns. That freedom matters more than predictability. And that whoever wants types, DI, and clear contracts simply doesn't understand the beauty of dynamic languages.

In 2007, I wrote an article Ruby on Rails? No, Thanks, where I criticized monkey patching – the Ruby habit of arbitrarily redefining existing classes at runtime. The community explained to me that I was rigid and didn't understand modern programming.

In 2012 came the article Will Rails Discover Dependency Injection?, where I described how Rails rejected dependency injection with the argument that “Ruby is such a good language that it doesn't need DI at all.” The Post model served as both entity and repository, dependencies hid behind static calls, and the whole system held together only through conventions and hope. I predicted that Rails would one day discover DI and it would be a big deal.

It's 2026.

They still haven't ☹

JavaScript Is Dead

Look at the results of the State of JavaScript 2025 survey. 40 percent of developers write exclusively in TypeScript. And how many write exclusively in plain JavaScript, without any types whatsoever?

Six percent.

That's fewer than people who believe the Earth is flat. In 2025, TypeScript became the most-used language on GitHub, overtaking Python and JavaScript itself. In a single year, it gained a million new contributors – a 66% increase.

What's more: TC39 itself, the committee responsible for JavaScript's evolution, is working on a proposal to add type annotations directly to the language. You know why? Because “static typing” was the most-requested missing feature in the State of JS survey five years running. Every year. 2020, 2021, 2022, 2023, 2024. Developers wanted types so desperately that it imprinted itself into the very specification of the language.

JavaScript without types is a dead language. It just doesn't know it yet.

The Duck Showed Its True Colors

And Python? Python, the sacred land of duck typing? The homeland where generations of programmers learned that “if it walks like a duck and quacks like a duck, then it's a duck and you don't need to know anything more”?

86% of Python developers now regularly use type annotations. Guido van Rossum, Python's own papa – the very person who for decades put no types in the language – declared type annotations a crucial benefit for large project productivity. And then went to work on mypy, a tool for static type checking.

FastAPI, the most popular Python web framework, is literally built on types – it won't even start without type annotations. Pydantic, the data validation library that half the AI ecosystem runs on, is existentially dependent on types.

The duck got type annotations fitted.

And Ruby? Ruby's type ecosystem is split into two incompatible systems – Sorbet from Stripe and the official RBS. Neither has achieved mass adoption. DHH, the creator of Ruby on Rails, stands on the barricade with a banner reading “No to Types!”, rejecting them, rejecting DI, rejecting essentially everything that software engineering has considered best practice for the last twenty years. At RubyKaigi 2025, both camps finally tried to find common ground and bridge Sorbet with RBS. Whether it leads anywhere remains to be seen.

All dynamic languages headed the same direction. Toward types. Some faster, some slower. But all of them.

We Were Doing This from the Start

PHP has had runtime types since 2004, when version 5 was released. But the road to full types wasn't straightforward. In 2015, there was a vote on scalar types for PHP 7, and they nearly didn't pass. The vote ended 108 to 48 – just barely above the required two-thirds majority. Four votes the other way and PHP wouldn't have scalar types. It was called “The Great Scalar Type War” and it was one of the most dramatic votes in PHP's history. Fortunately, reason prevailed.

In Nette, we blazed this trail long before it was trendy. Nette Framework had full dependency injection since version 2.0 in 2012. Not as an optional add-on, but as the foundation of the entire architecture. At a time when DHH was declaring DI an unnecessary Java pattern, we built a complete ecosystem around DI and wrote documentation that to this day remains one of the clearest explanations of dependency injection in any language. And we educated the entire Czech PHP community on it.

Nette 3.0, released in April 2019, became the first full-stack PHP framework in the world with a complete type system. Every file declare(strict_types=1). Every parameter typed. Every return value. Every property.

Symfony 5.0 added full types seven months later. Laravel?

Laravel doesn't have strict types even in 2026. And often lacks even native types.

And then there's PHPStan by Ondřej Mirtes – a Czech tool with 344 million downloads today that makes type checking in PHP stricter than in many a statically typed language. In the latest version, PHPStan 2.0, level 10 was added, which detects even implicitly typed mixed values.

Why AI Killed It

You know what definitively buried duck typing? Not programmers. Not frameworks. Artificial intelligence.

2025 study found that 94% of compilation errors in code generated by language models are type-checking errors. Ninety-four percent. The type system is a safety net for code you didn't write yourself.

When I sit down with Claude Code today and work on PHP code with full types and PHPStan, the AI agent understands my code. It knows what functions accept. It knows what they return. It knows what properties objects have. It knows what's allowed and what isn't. In duck-typed code, it would be flying blind.

Duck typing was always a dumpster fire. But at least a dumpster fire that somehow worked at small scale. In an era where AI agents generate hundreds of lines of code daily, it's a dumpster fire that doesn't work at all.


So let me sum up: TypeScript buried vanilla JavaScript. Python added types and 86% of developers use them. Ruby is floundering. And PHP? PHP has full runtime types, PHPStan with 344 million downloads, and Nette, which was doing this before it was cool.

Normally I'd end with a self-deprecating paragraph about how nobody likes the guy who says “I told you so.” But you know what?

I told you so.