logoalt Hacker News

js212/09/20241 replyview on HN

> Strong/weak is a meaningless dichotomy

Strong/weak is not a dichotomy. It's a spectrum. That's why folks argue over where a language lands in the spectrum. OTOH, static (compile-time) vs dynamic (run-time) is a dichotomy. There's not really any in between. It's clear when and where typing occurs. So there's nothing to argue over.

> Typed versus untyped is, on the other hand, a rigorously defined academic distinction

A typed language is one that has a type system. Python has a type system. It's typed.


Replies

lolinder12/09/2024

Academically, no, a type system is by definition static. See the definition Benjamin Pierce gives in TAPL that I've placed in many comments in this subthread [0] and won't repeat here.

Colloquially, yes, python has a type system. All I'm saying is it's unhelpful to correct someone for using the more correct definition rather than the colloquial one. Both definitions are valid, but if we're going to be pedantic we should at least use the academic definition for our pedantry.

And you're correct, I should have said spectrum, but the point is still the same: even Wikipedia refuses to define "strongly" or "weakly" typed, suggesting people use terminology that isn't hopelessly muddled.

[0] Here's one: https://news.ycombinator.com/item?id=42368689