Slashdot Mirror


Ask Slashdot: How Often Do You Switch Programming Languages?

An anonymous Slashdot reader writes: I always see a lot of different opinions about programming languages, but how much choice do you really get to have over which language to use? If you want to develop for Android, then you're probably using Java...and if you're developing for iOS, then you've probably been using Swift or Objective-C. Even when looking for a job, all your most recent job experience is usually tied up in whatever language your current employer insisted on using. (Unless people are routinely getting hired to work on projects in an entirely different language than the one that they're using now...)

Maybe the question I really want to ask is how often do you really get to choose your programming languages... Does it happen when you're swayed by the available development environment or intrigued by the community's stellar reputation, or that buzz of excitement that keeps building up around one particular language? Or are programming languages just something that you eventually just fall into by default?

Leave your answers in the comments. How often do you switch programming languages?

10 of 331 comments (clear)

  1. With every project. by Marc_Hawke · · Score: 3, Interesting

    Or at least it's the project that determines the language.

    I use half a dozen different languages every day. You can double that if you look over the past year. There are a lot of factors that go into choosing a programming language and "what's new and cool" rarely is one of them.

    The two biggest factors are 'what is the execution environment?' and 'what are the interface requirements?' Basically, 'who is going to run it' and 'what does it have to talk to?' (and they are closely related)

    Next comes 'what are the related/currently existing projects already written in?' It's rare that you want to rebuild the whole thing. (Although sometimes that's exactly what you want to do.)

    After that, I'll look at the available libraries and tools, but for the most part everything worth using is adequate in those areas.

    Finally, if it makes it that far, I'll pick something I'm familiar with, just the make the whole project faster and less work.

    Overall, it's been quite a few years since the 'language' of the project was something I even worried about. "When in Rome, do as the Romans do."

    --
    --Welcome to the Realm of the Hawke--
  2. Comment removed by account_deleted · · Score: 5, Interesting

    Comment removed based on user account deletion

  3. Re:How many pieces of hardware are in the system? by Dutch+Gun · · Score: 4, Interesting

    For me, it's not as much the hardware as the requirements of the software. I'm a game developer, so the engine and game are in C++, of course, no matter the platform. Our tools generally run on Windows, and productivity is more important than performance, so some of us use C#, while some other studios have used Java, from what I understand. If we need an extension language for our tools, maybe something like IronPython. If we're porting to Mac, toss in a bit of Objective-C. The web programmers use a lot of JavaScript, of course. Toss in some Lua as an embedded scripting language. There are probably a couple of minor cases I'm forgetting, but that's the bulk of it for my work.

    --
    Irony: Agile development has too much intertia to be abandoned now.
  4. How many times do you switch back? by EmperorOfCanada · · Score: 4, Interesting

    I have switched computer languages many times. Some times for good, some times just for a project, but often I find a "better" language, only to find that it has many dead ends or other problems. My present primary language is actually two: Python and C++. With these two there isn't much I can't do. Where one is weak the other is strong.

    That said, there are some situations where another language is called for. Javascript is pretty much the defacto browser language. Thus I would never try Python or C++ in the browser as that would just be horrible. But I don't really see Javascript as a great a language outside the browser as some people claim. Then there are scripting languages. I use Lua where I give users the ability to extend my programs through scripts because Lua is wonderfully tied into C++ through some awesome language extensions, they are tight and small. So would I say that I switch programming language when I jump to Lua or Javascript?

    That all said, some languages are pretty much dead to me. Java is solidly in the trash, .net is solidly in the trash, perl is solidly in my past, and very happily Objective-C is in the dumpster and I set it on fire.

    I think that an interesting question would be more, "What language(s) do you presently use, what languages are your last 5 years of code largely in, and what languages are presently on your list of languages you are interested in exploring?"

  5. I don't. C for life. by Nyder · · Score: 3, Interesting

    C does what I need it to do. Only thing I'd switch to is probably assembly, since that would make the code run faster.

    --
    Be seeing you...
  6. Don't be Dogmatic by Plus1Entropy · · Score: 4, Interesting

    You should almost never have the mentality of "I don't use such-and-such-a-language", whether it's because you don't like semicolons, hate whitespace requirements, or some other bullshit reason (come at me, I know you're out there :P). That doesn't mean you can't prefer one or the other, or even gripe about it to your co-workers; just don't let it get in your way.

    If you've done enough programming and know at least 1-2 languages fluently, you should be able to pick up another very quickly (less than a week). Often, at a particular company or on a particular project, you don't get a choice. If you do, the requirements of the project will force you to choose between 2 or 3. If you happen to be in a situation where you have absolute control and get the final say on what language to use, then you should choose the one that is best for the job.

    But when I say "best for the job", I don't necessarily mean in some theoretical, push-your-glasses-up-your-nose sense. I mean what will allow you to do the best you can to achieve the requirements of the task at hand. If the task at hand is to teach yourself something, choose a language you're less familiar with. If it's to meet the requirements of a client in a reasonable amount of time, choose a language you are more familiar with. If the application is computation heavy and speed is a requirement, choose a more efficient language. If you are not the sole developer, choose a language that your co-workers would be more comfortable with using.

    Often (read: always), more than one of these factors will be relevant. It's up to you, individually or as part of a team, to weigh them and determine the best choice. That is what it means to be an expert.

    Simply put, you should switch languages whenever you deem it necessary to do so. To know when it's necessary, you have to expose yourself to a lot of different languages.

    --
    Only crack the nuts that crack. You don't put the ones that don't crack in the sack.
  7. Switch? by drolli · · Score: 5, Interesting

    I dont switch. I start to use programming languages when is see it fit and stop to use them when I see it fit. It is not a 'Everything in one language' thing. Depending on the project, languages switch positions.

    1987-1990: Basic
    1988-today: Assembler
    1989-1993: Pascal
    1990-today: C/C++
    1995-2010: perl
    1996-today: octave/matlab
    1999-2005: Autolisp
    2000-today: Java
    2002-today: Python
    1995-today: bash
    2007-2011: tcl/tk

  8. Re:So far, I don't by TheRaven64 · · Score: 5, Interesting
    C++ has recently replaced a lot of scripting language usage for me. C++14 has most of what I want from a scripting language:
    • First-class closures (and the 'auto' type on parameters in lambdas in C++14 is really useful).
    • Mostly automatic memory management (shared_ptr / unique_ptr).
    • Regular expressions.
    • Fast I/O
    • A rich set of efficient built-in data structures (associative arrays, lists, vectors, sets)
    • Reasonable performance
    • Multithreading
    • The ability to package my scripts into a library for embedding in other applications later

    For small programs, compiling C++ at -O0 takes under a second and the result runs faster than any interpreted language.

    --
    I am TheRaven on Soylent News
  9. Re:So far, I don't by jellomizer · · Score: 4, Interesting

    C/C++ is good for canned software meant for wide deployment where you have fine tweaking of the performance so it can run fast on a big set of software. However scripting languages are good for those internal jobs that need to be fast enough but programmed quickly without all the rigor, so you have a useful app running quickly.
    Most of my programs I make are server side and I rely on scripting languages to do much of the grunt work because they can do it without the fuss of C.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
  10. Really depends on the context... by Junta · · Score: 3, Interesting

    In my work, we deal with a wide variety (basically a large number of existing projects lead by other groups). So not only language, but style guidelines, processes, everything we adjust continuously to match whatever project we are working on at that moment.

    I have been in other positions where you must not use anything but the one true process, language, and style guideline as set forth by the company standards.

    In terms of when I *choose* for starting new, it's based on the available skills of the team I can put together. Despite all the 'oh language X is better than language Y', 99% of the time it doesn't really matter. You can do most things in any language, so it's most important to select whatever your team is most comfortable with. Yes, the potential performance and resource utilization may be better in some languages versus others, but most of the time with average teams, design choices will matter far more than runtime/compiler differences.

    --
    XML is like violence. If it doesn't solve the problem, use more.