1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Trying to break the Java habit

Discussion in 'Mac Programming' started by wrldwzrd89, May 29, 2012.

  1. macrumors demi-god


    I've been a long-time Java coder. I'm looking to transition away from Java, though, as I've found it to be less than satisfactory for what I use it for. I'm finding it hard to decide which language to use instead... I've whittled the numerous choices down to C (or its derivatives, like Objective-C, C++ and D) or Python. The stumbling block that's hindering me from making a final decision easily is one of compilers - I intend to develop open-source stuff primarily, so I'd prefer a compiler with a license compatible with the stuff I develop. Both C and Python have such a compiler - heck, the whole toolchain is compatible from the get-go. However... I'm also going cross-platform (OS X, Windows, Linux), which is where things get a bit dicey. Targeting OS X and Windows, without Linux, would be easier; as would OS X and Linux (there things are a LOT simpler). It's trying to juggle all 3 that is giving me grief. Here's the crux of the problem: Python's more mature on Windows, but slower. C is less mature on Windows (MinGW and MinGW-w64), but faster. For the curious, I've been a Java game developer ever since I started writing programs for PCs rather than graphing calculators, and I intend to continue writing games, but also have an interest in creating utility programs.
  2. macrumors regular

    Yeah, Java really does make things harder than they need to be these days.

    Not sure what the solution is for someone that works in games / crossplatorm, though without doing any research whatsoever I'd be looking at a JS/WebGL type solution. Might be worth a look in ;)

    Personally, I'm trying to move towards a Scala based workflow as heaps nicer to code in and runs on the jvm, but I'm not sure that that would really help you in the space you're in.

    FWIW, I'd choose python over C any day of the week :)
  3. macrumors demi-god


    That's what I was leaning towards - Python. Thanks, your input is appreciated.
  4. macrumors 603


    I wouldn't say C is less mature on Windows. Most people tend to use Visual C++ for their C or C++ programming on Windows. I'm aware of the fact that it is not an open source tool chain but the express version is free and is a suitable compiler to target for open source software. The primary disadvantage of Visual C++ is that it only supports C89 so if you are planning on using any C99 or C11 features you'll be out of luck. It's support of modern C++ is much better though.

    Python is an awesome language. I love it. Another advantage is that you can write Python modules in C or C++ for speed and then use them in your Python programs. Best of both worlds :). Read up on the Python C API here: http://docs.python.org/c-api/index.html
  5. macrumors demi-god


    Neither the express edition nor the ultimate edition with strings attached that I got from school are really suitable for my purposes, alas.
    Thanks for the link, I'll definitely look into it later!

Share This Page