|
|
|
|
|
by tangledweb
4677 days ago
|
|
I've always loved that fractal of bad design rant. Many of his gripes follow really neatly from his initial analogy of the hammer with claws on both sides. Let's say you want to hammer in a nail. You reach into a tool box and pull out something that you think is a hammer. Instead it has claws on both sides, and is in fact a nail puller. You don't know much about tools so you use it to beat in nails, all the while grumbling to your friends that it's a bad hammer. For instance, I don't see how you expect to "solve" most of the "issues" in that. The fact that the author does not like the way == works in a weakly typed language is not a bug. Sure, it present bugs in code when programmers don't know how implicit type casting works, but it's really nice if you do. |
|
I don't see how to solve most of the issues, either. That sucks, and I genuinely sympathize with Zend on this, but it doesn't make them not-issues. As I think I said, they'd be acceptable if they were reasonable tradeoffs, but many of them are not.
Your == counterargument seems apologetic and trivially applied to anything: whenever a program is wrong because the language violated expectations, it's the programmer's fault for not having memorized some matrix of arcane rules. Languages aren't perfect and human beings have wildly differing expectations, but ultimately we only have programming languages to make it easier to express ourselves—no one's stopping you from writing the next big web 2.0 thing in x86 machine code. So yes, when it's difficult to reliably ask a language "are these things the same" without learning paragraphs of gotchas, that's bad.
Glad you enjoyed the article!