Hacker News new | past | comments | ask | show | jobs | submit login

This entire post seems to conflate "weak typing" with "dynamic typing". Both are terms that seem to have a lot of common definitions, but they're nevertheless distinct.

Weak typing usually implies a system where types get coerced easily:

    php -r "echo '4' + 4;"
    8
Dynamic typing, though, generally means that the type is associated with runtime values. It doesn't mean that the typing is necessarily weak:

    ruby -e "'4' + 4"
    -e:1:in `+': no implicit conversion of Fixnum into String (TypeError)
	from -e:1:in `<main>'



That's cool and all but I think that the point of the article is that the distinction is moot, because they just don't offer anything near the expressive power of algebraic typing.


"Weak" and "strong" are not well-defined terms, and you'll find different defs around the place.

I deliberately used "weak" in the title as a loose umbrella term for the sundry malpractices detailed below. The article is hopefully otherwise quite specific.

In particular, by "types", I always mean "static types" or "propositions". What you mean mean by "dynamic types", I call "tags"; they are not the topic of the article. These usages are standard, if not universally adhered to; I hope I made this clear in the article.


Unfortunately weak typing is still a very ill defined term and is somewhat misleading because it tends to carry a lot of implicit assumptions about which type coercions are expected. Implicit conversion between floating point and integral types for instance.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: