Posted on 07/06/2009 12:40:46 PM PDT by ROTB
I'm writing a desktop application that I'd like to deploy onto Windows, Macintosh, and Linux. I'm trying to pick the language that will give me the most conveniences, without setting timebombs that will go off down the road.
Here's what I think I know so far:
C++ Pros:
1) resulting code runs fastest, provided I am not a bonehead
2) most flexibility in memory management
3) Maximum difficulty in reverse engineering my object code, though there is nothing revolutionary or complex in what I plan to write.
4) Tools are rock-solid.
C++ Cons:
1) memory management is the biggest hassle, though garbage collection, usage of stack, pools, and smart-pointers, can mitigate this. 2) cross-platform programming requires much work for me to manage
Java Pros:
1) Cross platform programming handled
2) Memory management easier relative to C++
3) Lots of Tools, fairly mature
4) many years of advancements over C++
5) "Hot-Spot" compilation can make code run nearly as fast as C++
Java Cons:
1) 10 Megs of runtime need to be packed up with my app, since users might not be technical enough to install a JRE on their own
2) Code is more easily reverse engineered than C++, but how good are the obfuscators?
C# Pros:
1) Through Mono, I can deploy in lots of places
2) I get to use Developer Studio initially, and then use less capable IDE's for porting
3) Handles garbage collection, and does more for the programmer than C++.
4) Lots of libraries.
C# Cons:
1) I might have issues with Mono working exactly like Microsoft's runtime.
2) What did I forget?
C# Questions:
1) Does it compile to machine code, or bytecode? If bytecode, does that compile to machine code?
Python Pros:
1) Clean expressive syntax
2) Cross platform programming handled
3) Memory management easier relative to C++
4) many years of advancements over C++
5) More rapid iteration, since the projects needs not be compiled.
Python Cons:
1) Bytecode can be reverse engineered, but "Shed-Skin" would make the resulting code as fast and as difficult to reverse engineer as C++, BUT "Shed-Skin" is a work in progress, and if the lead-programmer dies, I would have to pick up the slack. I might also need to find bugs myself.
Please correct my bad assumptions, and make sure I have analyzed this problem correctly. I don't want to re-start once I start.
Perhaps when I am done writing it in Python, "Shed-Skin" would be mature enough to use. Risky!
Go to college for 4 year program and you will realize why none of your questions make sense
Java, without question.
I’d recommend using a mixture of XML, Cobol and BASIC. Oh, and deploy it on CP/M.
All tech comparisons ... that is a bad idea. You need to include non-technical issues in your comparison. IT does not live for IT alone.
Consider comparison of things like ...
Time to market (develop)
Ease of user interface (from the user perspective)
Updates and maintenance
Lowering cost by reducing the time for additional developers to come up to speed.
Difficulty in troubleshooting / debugging
etc
Java.
Only a much superior alternative that runs native FAST.
Qt - A cross-platform application and UI framework
Where are you coming from for such a harsh comment? I teach C++, perl, and assembly language for my company employees. I have an M.S. in computer science. I have programmed in Java [being the project lead for an industrial grade J2EE transaction manager for several years] and have debugged Python code. I thought the poster was headed down the right track.
However, I didn’t hear anything about graphical requirements for the application. That certainly should be considered.
Do you have other constraints such that, for java, packaging your app with the jre is an impediment?
What will your application do? Could your app be run on a server using a ‘software as a service’ model?
C# does not compile to byte code, like java it compiles to an intermediate code, called MSIL, and you’ll need to make sure the .NET runtime is on any machine that wants to run it. Unless C# has a native compile option I am unaware of.
I would never rely on Microsoft if your goal is to be multiplatform compatible, you are shooting yourself in the foot before you get out of the gate if that is your goal.
Your only serious options are a native language like C, C++ etc, and utilizing Macros in your compiler to have one set of source to compile for multiple environments, or Java. Yes, you can use a scripting language like a Python, but this doesn’t resolve your decompiling issues, performance speed concerns, or your need to make sure that the runtime is on the machine.
Java is the only real “language” option you have if you are doing serious stuff. If you are doing things that a scripting language will work for you, Python is fine but you aren’t going to get speed or escape the dependence of needing the run time, or safe compiled code.
If what you are trying to do is something that a scripting language can handle, pick your poison, ones the same as another as far as I’m concerned. If you want a full featured language with cross platform compatability, “write once run anywhere” java is the only serious option. If throughput or low level operations are needed, then you are talking C or C++ or something that compiles directly native language and you’ll need to compile different runtimes for different platforms and keep your source code maintainable with all those differences that may be needed.
Good luck
I second this, but I don't think of Qt as being C++. With moc and its low level classes, I consider it another language entirely.
Use C#. I’ve spent years doing both, and C#, along with Visual Studio is superior.
I was saying use C++ with Qt. That’s one of our main development enviromnents in the seismic industry.
I would go with Java, and with Java FX you could eventually port the apps to other peripherals, i.e. handhelds.
This assumption is incorrect if you do not obfuscate your code prior to distribution. .Net Reflector will decompile your .Net assembly into perfectly readable code that can be modified and recompiled.
If you program using “objects” and the paradigm fits the application, then you might be quite happy with Java. On the other hand, if you aren’t comfortable with the object straight jacket and/or it doesn’t fit the application, then you might be better off with C++ where you get to make your own choices. It looked to me like python was also more flexible in that regard.
What I was pointing out is that with Qt, nearly all the cons of C++ are eliminated. You don't have to work to do cross-platform, you don't have the garbage collection issues, you don't have to deal with half-thought-out STL methods, and you get a huge amount of mature classes with elegant binding through moc, not to mention the new dev tools. And now since it's LGPL, you don't have to pay to make a product with it.
Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.