views:

282

answers:

5

If i have an idea for a new program, and i would like to make it open source, what would be the best language to write it in, with regards to possibly porting it to other platforms, i.e. linux etc. I will be writing it for windows for a start.

A: 

QT would be good choice provided you are familiar with c++

yesraaj
+2  A: 

Honestly, this is a really difficult question: what language(s) do you know?

If you want to port it later, don't use anything platform-specific (like VB6, or Objective-C).

If it will have a GUI, pick a cross-platform library, such as QT, or perhaps Java. I've had intermittent success with Java's "write once, run everywhere" philosophy, but I haven't written in it since 1.4.2.

warren
+1  A: 

I would choose a language that is easy, people know, and people use cross-platform. This way you will encourage contributors, on every platform.

For this I would recommend Java or Python (with c, c++ as close runners up).

Ali A
+5  A: 

Choose the language you want to write in, that won't lock you out of any platforms in the future.

Because it's open source, and you starting out on your own, the only thing to keep you going at times is the fun you're having doing it.

Unfortunately, there is only a small probability that your project will take off; language choice will be a part of that, it's true, but a lot of other things will govern that.

  • pick something you want to write in - chances are others will want to write in that language.
  • same with the operating system.
  • Cross platform execution is important, but this isn't going to limit you too much - you can ship with a JVM, or sometimes, an implementation of the scripting language of choice.
  • (less importance) a language feature that allows for extensibility, e.g. OSGi in Java, components in other languages.

At the intersection of fun and cross platform, I see:

  • Java (maybe not for everyone)
  • Languages on the JVM - e.g. jython, scala, jruby
  • Python
  • Mono - but not for GUI apps, as C# and mono gtk aren't yet compatible.
jamesh
A: 

My suggestion is Python. If you've ever done programming Python is really easy to learn, there are a lot of source materials out there, there are a lot of well done and well documented modules for any kind of application work. The language is cross platform, bytecoded with with several packagers aviable (PyInstaller, Py2exe and Py2app) . For a classic desktop app I would suggest you to use : sqlite Python 2.5+ wxpython (a cross platform gui toolkit)

Nikola Stjelja