3 ms·
Every language involves tradeoffs. The initial JS tradeoffs were ok for the target audience and environments. A "carefully-designed language" in 2019 might ho
by TAForObvReasons 7y ago
Every language involves tradeoffs. The initial JS tradeoffs were ok for the target audience and environments. A "carefully-designed language" in 2019 might hold up for 2019 use cases but we don't know whether the tradeoffs will make sense in 2029
- peteradio 7y agoCan't we be reasonably sure it will be better than a weekend spitball? (The most successful spitball of all time to give due credit)
- munificent 7y agoThis 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/ https://brendaneich.com/2012/04/the-infernal-semicolon/ [1]: https://news-web.php.net/php.internals/70691 https://news-web.php.net/php.internals/70691