5 ms·
The point isn't to use a hammer for everything, it's that you maybe don't need to get a new, slightly different sized, hammer every time you get a slightly diff
by swores 4y ago
The point isn't to use a hammer for everything, it's that you maybe don't need to get a new, slightly different sized, hammer every time you get a slightly different size of screw to hit in. And that when you want to pull a nail out you can use the other side on your claw hammer, rather than go hunting for a dedicated NailRemoverPro TM that you've heard will make your nail removal even smoother.
Unlike with carpentry, when it comes to programming languages there actually are multiple options that can be used for such a wide range of purposes that it's possible to built entire projects/products using just the single one you prefer, which is of course less likely to be feasible when it comes to using a single tool like a hammer.
- bruce343434 4y agoChoice of language has much larger implications than you are implying. Yes, every language is turing complete. Now write a regex engine in pure "turing machine". Sucks, doesn't it? This is known as the "Turing Tarpit". Every language has unique strengths and weaknesses and it's absurd to pretend they're all kinda the same. I wouldn't write a website in C. I wouldn't write a robot arm driver in PHP. I wouldn't write anything more complicated than a throwaway script in bash. I don't mean to be disrespectful, and perhaps I didn't read your reply right. But it seems to me if you don't differentiate languages, then you either don't have enough knowledge of and exposure to various programming techniques and language design ideas, or you're making an argument in bad faith.
- TazeTSchnitzel 4y agoI think you do your point a disservice with your examples. General-purpose programming languages are nothing like Turing tarpits. > I wouldn't write a website in C. With appropriate libraries, why not? The safety issues might be a problem, but you could sandbox it. > I wouldn't write a robot arm driver in PHP. I would. It's general-purpose enough to speak binary protocols without too much hassle, though it'd be more fun to use something else.
- bruce343434 4y ago> With appropriate libraries, why not? The safety issues might be a problem, but you could sandbox it. Ok, go ahead use air ducts as water pipes. Just "sandbox" it with some plastic wrap.
- tialaramex 4y agoI have written a web site in C about twenty years ago, and it was terrible. Absolutely Turing Tarpit category, the language is just completely inadequate for this problem and so you spend all your effort trying to build something which is suitable out of the language, which again, yes, Turing Completeness, of course it's technically possible but it's a bad idea. Web sites are full of strings, and C doesn't really grok strings. Not in the way WUFFS doesn't grok strings (there are no strings in WUFFS, it has no string type, it's not a general purpose language it's not for that), more like the way New Forest ponies don't grok traffic laws.
- TazeTSchnitzel 4y agoMany high-level languages with good string support are implemented in C. The C standard library sucks but it's not your only option for handling strings.
- wiseowise 4y ago> Now write a regex engine in pure "turing machine". Sucks, doesn't it? This is known as the "Turing Tarpit". Jesus, we’re talking about primitive CRUDs here, not tegen engines.
- userbinator 4y agoThe hammer analogy makes me feel obligated to post this classic: https://gwern.net/docs/cs/2005-09-30-smith-whyihateframeworks.html https://gwern.net/docs/cs/2005-09-30-smith-whyihateframework...
- sokoloff 4y ago> don't need to get a new, slightly different sized, hammer every time you get a slightly different size of screw to hit in. I don’t know for 100% if that (hammer in a screw) was intentional or not, but it was beautiful.