Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Without starting a religious war, I'd like feedback on languages I'm considering for a project. I've done a lot of research, but I have a lot of gaps still and am hoping to narrow my research efforts. I've had friends advise me, but most are experienced in one language on my list and can't compare them well (and I know a few are VERY prejudiced!). I'd like feedback in case any points I list are inaccurate and so I can get an idea of which languages to research more.

Each of my human clients will have a server (which I have full control over) on their office LAN. But I can't count on a static IP address and, for several reasons, can't count on installing anything but a VERY bare minimum on my client's workstations. The server is an embedded system (500 MB memory, 500 Mhz CPU, running Debian Linux).

I'll have a VERY minimal install on their workstation that sends a broadcast message, finds my server, then runs the rest of the program from an SMB (or NFS) mount existing on my server. The program needs to run on Windows, OS X, and Linux.

I think it's fair to make an assumption that the client's workstation wil have Java installed.

I'm considering several languages to use based on a several different factors:

1) Footprint: The less I have to install on the client computer, the better.

2) Coding speed/time: Naturally I want to get it done sooner rather than later.

3) Portability: I don't want to have to write much OS specific code or use a non-automated build process for different OSes. (Which will help when patches are issued, of course.)

4) Learning a new language: I'm willing to sacrifice SOME coding speed to learn a new language, or learn more about one I know a little of (this applies mainly to C++ and Python).

5) GUI: It'd be great to provide a native GUI look 'n' feel for each platform (OS X, Linux, and Windows), but that's unlikely. I want to avoid a GUI most users will consider ugly. (In other words, I'd like to avoid some of the GUIs used more on *nix on Windows, since many less technical people consider them boxy or clunky.) Having one GUI look 'n' feel (like in Java) for all three platforms would be a good choice.

Here are the languages I'm considering:

Java:

Positive: It's WORA, I can pretty much count on a JVM being on any desktop computer. The GUI look 'n' feel will be the same on all three platforms, so tweaking GUI elements for each OS won't be much of an issue.
Issues: I code MUCH slower in Java than almost anything. It's a frustrating language for me to write in.

Perl:

Positive: I code quickly in Perl (about 5x faster than with Java), it's got great text and string handling abilities.
Issues: Requires Perl langauge executable installed on client (remember, minimal install on client computer!), and I'm told some things, like multi-threading, have to be handled differently on Windows than on *nix. I'm also not sure how much OS specific code I'd have to write.

Python:

Positive: I'm very new to Python (barely know any at this point), so learing it will be a big plus. I'm told, by several people, that an experienced Perl coder can code faster in Python than Perl. I can also compile Python to Java byte code with Jython, so I have all the advantages of Java without the lack of coding speed I have with Java and I can use Swing, so the GUI will be easy to handle without OS specific code.
Issues: I don't know Python as well, so I don't know if the above statements are true. I don't know if I'm likely to end up with code that works on Python but not on Jython.

C++:

Positive: I actually code faster in C++ than Java (but not as fast as Perl). I haven't used it too much, so I'd be learning a lot. Friends tell me that if I'm not doing low-level stuff, that I wouldn't need OS specific code and it even handles multi-threading on Windows better than Perl. I can use something like wxWindows for a multi-OS GUI. C++ would give me native code for each OS, which would mean no need for an interpreter.
Issues: Is it really standardized across platforms as I'm told? And does it actually handle multi-threading well on Windows with the same code I'd use on Linux? With something like wxWindows, how much OS specific code would the GUI need? How easy is it to automate the build process for three different OSes?

Thank you for supporting or correcting any assumptions I've stated and for any additional feedback on the strengths or issues in the different languages.

share|improve this question
5  
"I can pretty much count on a JVM being on any desktop computer" << I wouldn't be so sure about that these days (also, you'd need to prepare for the situations when it is not present) – fish Apr 22 '11 at 7:08
You can change the L&F in Java. see here download.oracle.com/javase/tutorial/uiswing/lookandfeel/… – Mahmoud Hossam Apr 22 '11 at 14:08
1  
You probably know Java is the tool for this job. You just hate it and want us to tell you it's alright to use something else :) – Deckard Apr 22 '11 at 14:26
To elaborate more on Mahmoud Hossam's comment, Java 6's native look and feel is very hard to tell from a native app. Admittedly, Swing has a high learning curve, but is an excellent GUI framework. – Nemi Apr 22 '11 at 15:56
@Nemi: I haven't been using Java for a while and I can't actually remember which version I was using when I did use it. (I think it was Java 5.) But do you know -- is the L&F determined by the JVM? That's what I'd expect, which would mean if the code was on the server but run on the client's JVM, then there'd be no problem. (And I could use either Jython or Java at that point.) – Tango Apr 23 '11 at 1:32
show 2 more comments

6 Answers

I think many programmers forget the time and steep learning curve it took to gain their current proficiency in their currently preferred programming language. Unless completely unsuitable for the purpose at hand, or you have plenty of time to climb a learning curve, I would say the best programming language for almost any task is one you already know very well.

share|improve this answer

for nice cross-platform, native-looking GUI, the only 'easy' answer is Qt, and that means either C++ or (jumping a few hoops) Python.

Any other language you mention would either look non-native (Java) or pretty limited without installing a lot of extra cruft (Python, Perl).

About cross-platform C++: the language is well standardized, but the libraries aren't. You need a pretty complete cross-platform library. wxWindows will get you started, but you'd hit a point pretty soon and start writing OS-specific code for several small warts. And the themes aren't so native-looking either. You really want to check Qt.

share|improve this answer

Java is the only one that abstracts enough low level stuff so you don't have to mess with the OS. All your other choices are either non-portable or require a runtime environment like Java but offer a lot less in terms of OS/Hardware abstraction. If it was up to me I would go with Java but you mention perl is your most proficient language so if you're willing to tackle threading issues like you mentioned then perl is probably the best way to proceed.

share|improve this answer

I can only speak for Perl here: For concurrency there are things like POE and AnyEvent. For parallelism we usually spawn multiple processes. Threading is available, but I have no experience with it on any Windows.

For the GUI you would most probably want to take a look at the wxWidgets bindings. One example of a Perl application using Wx would be the Padre IDE. Padre also uses threading, if a real-world example is needed.

share|improve this answer

If you want to target Jython, that's fine. But I suggest that you don't try to produce code that will run on both Jython and CPython. In Jython you can use any Java classes which means that it makes the most sense to use the Java GUI classes to implement a GUI. I'm not aware of any gui framework that is portable between CPython and Jython. However, coding in Jython works pretty much the same as CPython. The only annoying bit is that the Jython takes longer to start then CPython.

You can also go for pure python. Py2exe provides a tool for making a copy of your python program which can run standalone. That way you don't even have to assume that the JVM is installed. However, it does depend on the Microsoft Visual C++ runtime being installed. But that's probably more widely installed the JVM. It will produce a somewhat larger installation footprint, its not that big and it depends how picky you are.

In either case, make sure the installation process can handle the missing dependency.

share|improve this answer
1  
Yes, Jython has the disadvantage that it doesn't have all the latest language features from CPython, but in my opinion, access to the full Java class libraries more than makes up for it. I work in a mixed Jython/Java environment and it's great being able to quickly build a prototype for new functionality by sub-classing an existing Java class with a Jython class. – Mark Booth Apr 22 '11 at 19:05
and @Mark Booth: From what you've said, my understanding is that the differences between Jython and CPython in coding are that 1) In Jython I can use the Java API and 2) In CPython there are newer features that aren't in Jython. In other words, those are the main "gotchas" and, in theory, if I avoided the newer CPython features and the Java API, I could write code that would work in both? (I'm not going to -- I'm just trying to be sure I understand your points.)( – Tango Apr 23 '11 at 1:37
@TangoOversway, yes, but also note that some python libraries are written partially in C, they won't run in Jython. But as long as you use pure python code that's old enough you should be fine. – Winston Ewert Apr 23 '11 at 23:23
  • portable GUI with native-like look:
    • wxWidgets (native C++, very good bindings for Python, Perl; Java bindings still not there)
    • Qt (native C++, very good binding for all other languages you're mentioned)
  • speed of development:
  • footprint:
    • I don't think any of languages you mention would have any problem
  • portability:
    • as above
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.