Hacker News new | ask | show | jobs
by adwn 1965 days ago
> A typical example, in dynamic programming languages, is to treat numbers as strings and vice-versa

That sounds great until it bites you in the ass really hard. In general, you want to catch unintended behavior as early as possible.

1 comments

You want to, but they don’t. Those people just want to get stuff done, as opposed to a language like Haskell or stricter where you’ll never be able to get old code to run because newer compilers print errors that take a week to understand. There’s some old Yegge articles about this…

PHP converting between strings and numbers is usually a mistake, but the one data structure doing everything (array and dict) is nice enough.