4 ms·
The drop in performance isn't just while learning. I worked somewhere where I had to regularly use TCL, Java, PHP, C++ and Python - each was the most suitable t
by gejjaxxita 12y ago
The drop in performance isn't just while learning. I worked somewhere where I had to regularly use TCL, Java, PHP, C++ and Python - each was the most suitable tool for the job (at the time the tool was written anyway) but the constant context switching caused a real and permanent performance hit.
- klibertp 12y ago> but the constant context switching caused a real and permanent performance hit Maybe context switches were too frequent? Or the opposite, too rare, which could lead to repeating the learning overhead each time? Personally I didn't notice any slowdown due to switching between languages and technologies - other then at the beginning, when I was learning them.
- nostrademons 12y agoFor me, it's the infrastructure & best practices that's the biggest cost. There are degrees of language learning. I went through a "everyone should be a polyglot programmer" phase when I had about 3-4 years of experience, because I was then proficient - not expert - at about a half dozen languages. At that point, I knew the syntax and semantics of all of them, the common standard library calls that I needed for everyday programming, and most importantly, I could mentally map between constructs in my head. So I'd be like "This is a 'for x in collection' loop in Python, a 'for (String x : collection)' in Java 5, a 'for (var x, i = 0; x = collection[i++];)' in Javascript', a 'map (\x -> ...) collection' in Haskell". I'm coming up on 10 years of experience now, and I try to limit the number of programming languages I work with pretty dramatically now. What's changed is that I now think of a language as an ecosystem and a culture, rather than a set of things I type into a computer. The typing is automatic; instead I'm thinking of the level of "Well, if I use Mockito and JUnit for my unit testing, here's how I have to set up my Dagger modules, and I can use Providers there to give me a dependency graph of ListenableFutures that will let me kick off a whole cascade of RPCs when a request comes in, all without having to manually manage the sequence of events." And all of those libraries have gotchas and best practices that I've internalized, which I think need to page out if I start working with another ecosystem. (This was perhaps a bad example because I'm actually much more fluent with Python and Javascript than Java now - but then, maybe that makes it a good example, because it shows how much tacit knowledge is important even for a simple forum comment, let alone a working system.) So I can't really judge your level of expertise over the Internet. But I'll caution you that views on this can flip-flop as you gain more experience. It's important to really learn one language well before judging that everybody should be able to use multiple languages with equal proficiency. "Learning them" is a continuous process, and there're tips and tricks that are very specific to each language that you continue learning even decades in. [1] http://www.reddit.com/r/haskell/comments/cguuj/a_haskell_webserver_in_ascii_art/ http://www.reddit.com/r/haskell/comments/cguuj/a_haskell_web...
- deleted 12y ago[deleted]
- klibertp 12y agoThanks for a thoughtful comment. I am aware of the things you mention, I just quietly assumed that "knowing" a language means knowing it and its ecosystem inside out, with all the major tools and libraries, how the major implementations work and how they differ and so on. I wouldn't advise going for polyglot programming without expert-level knowledge in at least most of the involved technologies. You're right that it's significantly harder to learn a language really well instead of just familiarizing yourself with basics and that it gets even harder when there are multiple languages involved, because the amount of quirks and peculiarities grows significantly with each of them. Nevertheless, I believe it is possible and I consider myself one anecdata point :) Although it took me a decade or so to get here, and I see a very long way ahead of me still, I already had a pleasure of putting my fairly deep knowledge of different languages and environments (it was C, Erlang, Python and JavaScript in this case) to use, with quite a bit of success for the project. So yes, it's hard and I understand why people don't like the idea, but I just can't agree with them, as in my experience most of the arguments against polyglot programming (on the programmers' side, management is another issue and their problems are much more real) just don't hold true.