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

This is generally true. Most languages were carefully designed and if they are disliked now, it's mainly because we've forgotten their original constraints in which the language's design made sense. (For example, header files in C are a reasonable approach when your compiler can't fit an entire source file in memory.)

But JS and PHP aren't that. They both have a lot of good ideas in them but they are also both hampered by lots of initial mistakes in their design. JS because it was designed so quickly, PHP because it was cobbled together ad-hoc by someone who wasn't focused on the design of the language.

Semicolon insertion in JS doesn't represent a smart trade-off from the past, it was just a bad design whose author didn't have time to fix it before it hit the marketplace [0]. Likewise, PHP's wildly inconsistent core library names aren't a sign of some thoughtful hidden order. They're because Rasmus lazily used strlen() as the hash function for strings and wanted them to go into different buckets [0].

[0]: https://brendaneich.com/2012/04/the-infernal-semicolon/

[1]: https://news-web.php.net/php.internals/70691

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