4 ms·
'Why are people obsessed about creating a "jack of all trades" language instead of letting languages do what they do best?' I can only speak for myself, but th
by wwwtyro 14y ago
'Why are people obsessed about creating a "jack of all trades" language instead of letting languages do what they do best?'
I can only speak for myself, but there is something extremely attractive about being able to do all of one project in a single language. A reduction in the overhead of context switches, perhaps? Fewer absent-minded semicolons in my python code? Correct me if I am wrong, but, isn't this a big part of the draw in Node.js?
- rom16384 14y agoI know what you mean. Coming from a Python background I first wrote Javascript in a Python-ish way. Now it's the other way around and I put semicolons at the end of the line, parentheses around logic clauses and use the wrong logic operators in my Python code. This because I work on both code bases simultaneously (Javascript on the client, Python on the server)...
- jaimebuelta 14y agoI have used regularly Python for backend and JavaScript for frontend at the same time (right now I am mainly using Python), and I never got those kind of cross-language problems... Curious...
- bstpierre 14y agoMost of the projects I work on require the use of several languages, and to me it's nice to be able to use the sharpest tool for each job. In a given day I might use one or more of C, C++, Python, sh (which possibly includes bits of sed/awk/etc), and make. In the not-far-distant past I switched between C, perl, python multiple times during the workday. The context switches aren't too jarring -- a stronger statement would be that I think it's easier to context-switch and use appropriate tools than it is to dance around a general purpose tool. E.g. substitution in perl or sed versus any other language.
- wwwtyro 14y agoYour point about sharper tools is absolutely fair and well-taken here. I wonder, though, are there diminishing returns when you have a language like Python that is a jack of so many trades? Is it worth the context switch for a tool that is only very slightly sharper?
- bstpierre 14y agoIt is usually worth the context switch, especially when (a) the project already has several tools in play and/or (b) the alternative is much sharper. A situation that calls for expect, or for sed, for example, is likely to be much more easily solved than with python. On the other hand, if you're working on a system that is almost exclusively python, it wouldn't make sense to use something only "very slightly sharper". E.g. calling out to perl to do some one-liner that needs 5 lines in python.