Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

Software Developers: C++, Java, Python, or C# for my desktop application? (VANITY)
Various ^ | 7/6/2009 | Me

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.


TOPICS: Computers/Internet; Focus Software; Hobbies; Science
KEYWORDS: computers; languages; networking; software
Navigation: use the links below to view more comments.
first 1-5051-89 next last
I am currently evenly split between C++, and Python.

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!

1 posted on 07/06/2009 12:40:47 PM PDT by ROTB
[ Post Reply | Private Reply | View Replies]

To: ROTB; rdb3; Calvinist_Dark_Lord; GodGunsandGuts; CyberCowboy777; Salo; Bobsat; JosephW; ...

2 posted on 07/06/2009 12:41:53 PM PDT by ShadowAce (Linux -- The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ROTB

Go to college for 4 year program and you will realize why none of your questions make sense


3 posted on 07/06/2009 12:42:35 PM PDT by Mr. K (THIS ADMMINSTATION IS WEARING OUT MY CAPLOCK KEY DAMMIT DAMMIT DAMMIT!!!!!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ROTB

Java, without question.


4 posted on 07/06/2009 12:42:53 PM PDT by libh8er
[ Post Reply | Private Reply | To 1 | View Replies]

To: libh8er
There is no alternative to Java. Consider the discussion closed.
5 posted on 07/06/2009 12:44:55 PM PDT by libh8er
[ Post Reply | Private Reply | To 4 | View Replies]

To: ROTB

I’d recommend using a mixture of XML, Cobol and BASIC. Oh, and deploy it on CP/M.


6 posted on 07/06/2009 12:45:06 PM PDT by TChris (There is no freedom without the possibility of failure.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ROTB

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


7 posted on 07/06/2009 12:45:25 PM PDT by taxcontrol
[ Post Reply | Private Reply | To 1 | View Replies]

To: ROTB

C++ with QT cross-platform application and GUI.

http://www.qtsoftware.com/


8 posted on 07/06/2009 12:46:34 PM PDT by avacado
[ Post Reply | Private Reply | To 1 | View Replies]

To: ROTB

Java.


9 posted on 07/06/2009 12:46:37 PM PDT by Terpfen (Ain't over yet, folks. Those 2004 Senate gains are up for grabs in 2 years.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: libh8er
" There is no alternative to Java. Consider the discussion closed."

Only a much superior alternative that runs native FAST.

Qt - A cross-platform application and UI framework

http://www.qtsoftware.com/

10 posted on 07/06/2009 12:49:07 PM PDT by avacado
[ Post Reply | Private Reply | To 5 | View Replies]

To: Mr. K

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.


11 posted on 07/06/2009 12:51:36 PM PDT by the_Watchman
[ Post Reply | Private Reply | To 3 | View Replies]

To: ROTB

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?


12 posted on 07/06/2009 12:52:11 PM PDT by posterchild (Endowed by my Creator with certain unalienable rights.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ROTB

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


13 posted on 07/06/2009 12:55:06 PM PDT by HamiltonJay
[ Post Reply | Private Reply | To 1 | View Replies]

To: avacado
C++ with QT cross-platform application and GUI.

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.

14 posted on 07/06/2009 12:55:17 PM PDT by dan1123 (Liberals sell it as "speech which is hateful" but it's really "speech I hate".)
[ Post Reply | Private Reply | To 8 | View Replies]

To: libh8er

Use C#. I’ve spent years doing both, and C#, along with Visual Studio is superior.


15 posted on 07/06/2009 12:55:51 PM PDT by rivercat
[ Post Reply | Private Reply | To 5 | View Replies]

To: dan1123

I was saying use C++ with Qt. That’s one of our main development enviromnents in the seismic industry.


16 posted on 07/06/2009 12:56:51 PM PDT by avacado
[ Post Reply | Private Reply | To 14 | View Replies]

To: ROTB

I would go with Java, and with Java FX you could eventually port the apps to other peripherals, i.e. handhelds.


17 posted on 07/06/2009 12:58:43 PM PDT by dfwgator
[ Post Reply | Private Reply | To 1 | View Replies]

To: ROTB
Maximum difficulty in reverse engineering my object code, though there is nothing revolutionary or complex in what I plan to write.

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.

18 posted on 07/06/2009 1:01:42 PM PDT by 6ppc (It's torch and pitchfork time)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ROTB

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.


19 posted on 07/06/2009 1:09:24 PM PDT by the_Watchman
[ Post Reply | Private Reply | To 1 | View Replies]

To: avacado
I was saying use C++ with Qt. That’s one of our main development enviromnents in the seismic industry.

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.

20 posted on 07/06/2009 1:13:35 PM PDT by dan1123 (Liberals sell it as "speech which is hateful" but it's really "speech I hate".)
[ Post Reply | Private Reply | To 16 | View Replies]

To: ROTB

Stick with Java if you want to run on multiple platforms. Java is fine unless you are doing an amazing number of calculations, transforms, etc. I personally think C# amd VB .NET are much easier to use and have a superior IDE, but only really work on Windows boxes (yeah, I know, there are emulators and whatnot ...)

IMHO, stay away from these goofy ‘designer’ and scripting languages. Java is useful everywhere.


21 posted on 07/06/2009 1:16:29 PM PDT by MatD
[ Post Reply | Private Reply | To 1 | View Replies]

To: dan1123

I get your point now!


22 posted on 07/06/2009 1:21:10 PM PDT by avacado
[ Post Reply | Private Reply | To 20 | View Replies]

To: TChris

COBOL - now there’s a blast from the past. I taught COBOL back in the 70’s...


23 posted on 07/06/2009 1:21:14 PM PDT by OrioleFan (Republicans believe every day is the 4th of July, democrats believe every day is April 15)
[ Post Reply | Private Reply | To 6 | View Replies]

To: HamiltonJay

I’ve been looking at some of the functional languages, like Erlang and Scala and F#, that supposedly will help improve performance on multi-core CPUs. Not sure about Erlang, what I like about Scala, is that it runs on the JVM, and seems to get the best of both worlds (OO and Functional programming).

And of course now with Oracle owning Java, it will be interesting to see what they do with JVM(s), which in the end, matters more than which language is used to generate the byte code.


24 posted on 07/06/2009 1:24:05 PM PDT by dfwgator
[ Post Reply | Private Reply | To 13 | View Replies]

To: ROTB

Take the question to http://www.stackoverflow.com and you’ll get a better range of answers.


25 posted on 07/06/2009 1:25:16 PM PDT by Rev DMV
[ Post Reply | Private Reply | To 1 | View Replies]

To: ROTB

Between Java and c#. Python is too fast and loose with the typing for me. Call me anal retentive, but I require strong typing.

Java has obvious advantages, especially vendor support for multi-platform, which is a big one. But c# was designed to address problems with Java, Delphi and others, thus IMHO comes out a much cleaner language. I also think c# has better data types and has a better generics implementation. The standard framework also has a ton of toys.

But add a problem for c#, your users won’t necessarily have the framework version you need. Many older systems are stuck at 1.1, which, trust me, you don’t want to program in. You need to go at least 2.0, which will entail a framework update for some of your users. So you’re possibly stuck in the same place as Java on that front, although the newer frameworks will install through Windows Update.

Answer to the question on c#, it compiles to a “common intermediate language” which is then compiled to native code by the CLR. It can cache this native version to make later runs faster. Basically, just like Java.


26 posted on 07/06/2009 1:29:13 PM PDT by antiRepublicrat
[ Post Reply | Private Reply | To 1 | View Replies]

To: OrioleFan
COBOL - now there’s a blast from the past. I taught COBOL back in the 70’s...

And I once taught Apple BASIC in the early 80's. :-)

Perhaps I should have recommended RPG + BASIC + COBOL + LISP... Multi-language projects are WAY COOL!

27 posted on 07/06/2009 1:32:45 PM PDT by TChris (There is no freedom without the possibility of failure.)
[ Post Reply | Private Reply | To 23 | View Replies]

To: libh8er

Java can now run almost as fast as C++ ... HAHAHAHAHAHAHAHAHAHAHAHhahahahahahaha... whew! sniff.


28 posted on 07/06/2009 1:37:14 PM PDT by epluribus_2
[ Post Reply | Private Reply | To 5 | View Replies]

To: All
If one wanted to start to learn computer programing what would be the best language to start with to build a foundation for learning how to write programs?
29 posted on 07/06/2009 1:59:17 PM PDT by Captain Beyond (The Hammer of the gods! (Just a cool line from a Led Zep song))
[ Post Reply | Private Reply | To 1 | View Replies]

To: Mr. K
Go to college for 4 year program and you will realize why none of your questions make sense.

Maybe you can tell us what institution is offering that PhD in applied asshole that you obviously graduated with honors from.

30 posted on 07/06/2009 2:02:59 PM PDT by Minn (Here is a realistic picture of the prophet: ----> ([: {()
[ Post Reply | Private Reply | To 3 | View Replies]

To: Captain Beyond
If one wanted to start to learn computer programing what would be the best language to start with to build a foundation for learning how to write programs?

Kind of depends on your eventual goals.

If you want to write small, usefull little things to help automate your work in Windows, I recommend Visual Basic. It's not real fast, but it's built into nearly everything Microsoft makes.

If you want to create web pages, learn HTML, Java, PHP, etc. (VBScript if you stick with Microsoft)

If you want to develop commercial software, you'll really need to invest in learning C++ or at least Delphi, IMO.

That's my $0.02 worth.

31 posted on 07/06/2009 2:10:55 PM PDT by TChris (There is no freedom without the possibility of failure.)
[ Post Reply | Private Reply | To 29 | View Replies]

To: posterchild

Can’t use “software as a service”. It must run locally.


32 posted on 07/06/2009 2:23:35 PM PDT by ROTB (Thou shalt not covet ... ANYTHING!)
[ Post Reply | Private Reply | To 12 | View Replies]

To: epluribus_2
Java can now run almost as fast as C++

When you compile to native code, there's no difference. Even with bytecode and today's fast machines the difference is negligible. The difference may be perceptible in computationally intensive stuff like fluid mechanics, graphics, FEM etc..

33 posted on 07/06/2009 2:41:39 PM PDT by libh8er
[ Post Reply | Private Reply | To 28 | View Replies]

To: Captain Beyond
If one wanted to start to learn computer programing what would be the best language to start with to build a foundation for learning how to write programs?

Python hands down. It is clear and doesn't get in the way, and doesn't saddle you with a bunch of concepts before you write your first line of code. The concepts you learn with Python are applicable to every major programming language you may want to move to in the future.

34 posted on 07/06/2009 2:57:27 PM PDT by dan1123 (Liberals sell it as "speech which is hateful" but it's really "speech I hate".)
[ Post Reply | Private Reply | To 29 | View Replies]

To: ROTB

I apologize to many who have said good things about Java for not pinging them all, first. Etiquette says I should...

If your application requires SPEED, or is an application that will be opened and left open for long periods of time, you MUST NOT use Java. I have found that ALL of the programs on my computer that use Java eat more and more time and memory all the time. Many of those programs I like, but I find I have to eventually purge them from the system, which is often not convenient. Quite a few programs look great when I fire them up and test them, and as long as I don’t put too much of a demand on them, they perform OK. However, when I start using them in a professional type sense, the time penalty explodes in at least a quadratic manner with the data requirements. Often, they bog down so much that I have to kill them using the task manager to get use of my computer back. If you are only going to be using short lists of data and have limited time requirements the program will be used, Java may be fine.

I’m not familiar with C#, and Python may have some of the same limitations as Java, though I’m not as familiar with that.


35 posted on 07/06/2009 3:28:11 PM PDT by AFPhys ((.Praying for President Bush, our troops, their families, and all my American neighbors..))
[ Post Reply | Private Reply | To 1 | View Replies]

To: antiRepublicrat
Between Java and c#. Python is too fast and loose with the typing for me. Call me anal retentive, but I require strong typing.

Python has strong typing:

>>> a = 2
>>> b = "hello"
>>> c = a + b
Traceback (most recent call last):
  File "", line 1, in ?
TypeError: unsupported operand types for +: 'int' and 'str'

36 posted on 07/06/2009 3:53:11 PM PDT by dan1123 (Liberals sell it as "speech which is hateful" but it's really "speech I hate".)
[ Post Reply | Private Reply | To 26 | View Replies]

To: libh8er
When you compile to native code, there's no difference.

Do people actually compile Java to native code? I knew Java compilers existed, but I didn't think anyone actually used them for anything but edge-cases.

37 posted on 07/06/2009 3:55:25 PM PDT by dan1123 (Liberals sell it as "speech which is hateful" but it's really "speech I hate".)
[ Post Reply | Private Reply | To 33 | View Replies]

To: dan1123
Do people actually compile Java to native code?

The feature is there mostly for geeks who get off on numbers and specs. Typically, they wear thick glasses, are underweight, have no spouses or girlfriends.. and live in their moms' basements. Most also voted for Obama.

38 posted on 07/06/2009 4:00:57 PM PDT by libh8er
[ Post Reply | Private Reply | To 37 | View Replies]

To: libh8er
The feature is there mostly for geeks who get off on numbers and specs. Typically, they wear thick glasses, are underweight, have no spouses or girlfriends.. and live in their moms' basements. Most also voted for Obama.

I think I've seen them on slashdot, reddit, and digg.

39 posted on 07/06/2009 4:44:20 PM PDT by dan1123 (Liberals sell it as "speech which is hateful" but it's really "speech I hate".)
[ Post Reply | Private Reply | To 38 | View Replies]

To: ROTB
Personally, I vote for the snake. You can actually get something useful done very quickly.

Read the interesting article Why Python? by Eric Raymond, who was originally kind of antagonistic to the idea of learning it, and chronicles his journey from that antagonism to fandom.

40 posted on 07/06/2009 8:16:39 PM PDT by Still Thinking (If ignorance is bliss, liberals must be ecstatic!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: TChris
Thanks for the advice TChris. I will look into VB for now and C++. Can you recommend some good books or websites to check out that will help the learning process?
41 posted on 07/06/2009 8:21:46 PM PDT by Captain Beyond (The Hammer of the gods! (Just a cool line from a Led Zep song))
[ Post Reply | Private Reply | To 31 | View Replies]

To: dan1123

Thanks for the link Dan1123 it is much appericated. :)

I will look at Python, VB, and C++ to start out with. Once again thanks for the advice.


42 posted on 07/06/2009 9:33:53 PM PDT by Captain Beyond (The Hammer of the gods! (Just a cool line from a Led Zep song))
[ Post Reply | Private Reply | To 34 | View Replies]

To: Captain Beyond
Thanks for the advice TChris. I will look into VB for now and C++. Can you recommend some good books or websites to check out that will help the learning process?

First, get Visual Basic: Visual Basic 2008 Express

Then try: VB Tutor

One of my favorites for web development, including VBScript and JavaScript: W3Schools

Otherwise... Google: VB Tutorials

43 posted on 07/07/2009 6:52:11 AM PDT by TChris (There is no freedom without the possibility of failure.)
[ Post Reply | Private Reply | To 41 | View Replies]

To: dan1123

That’s not strong typing, it’s duck typing. You didn’t have to declare a, b and c since they took on an assumed type of whatever you assigned to them. It then got caught during runtime, not compile time.

When I program I would wonder is a an int? Maybe it want it to be a byte, decimal, floating point, small (2-byte) int, large (8-byte) int, signed or unsigned.

Duck typing is not necessarily inferior, it’s just a style of programming I don’t prefer. But I do think a programmer should become proficient in strongly-typed design before he goes off with something like Python and produces a horrible, unmaintainable mess.


44 posted on 07/07/2009 6:57:26 AM PDT by antiRepublicrat
[ Post Reply | Private Reply | To 36 | View Replies]

To: dan1123; Captain Beyond
doesn't saddle you with a bunch of concepts before you write your first line of code

There's the problem with the young'uns these days. They want to sit down and learn a programming language before they actually learn how to program.

45 posted on 07/07/2009 7:03:07 AM PDT by antiRepublicrat
[ Post Reply | Private Reply | To 34 | View Replies]

To: dan1123
Do people actually compile Java to native code?

Check out JIT compilation. It happens on the fly. As far as making a standalone executable, that seems to miss the point of Java in the first place.

46 posted on 07/07/2009 7:08:39 AM PDT by antiRepublicrat
[ Post Reply | Private Reply | To 37 | View Replies]

To: AFPhys

Ditto. Java is the pits.

I’d use C# since I’m using it right now. C# or VB about the same, since both mean .NET stuff. But Desktop generally means a lot of UI. C# and VB do that easily.

If it’s a massive and complex app with performance issues I’ll use C++. I haven’t used python, so no can say.


47 posted on 07/07/2009 7:14:41 AM PDT by bvw
[ Post Reply | Private Reply | To 35 | View Replies]

To: TChris

My primary language was COMPASS, the Assembly Language on Control Data Mainframes. I supported the COBOL and Fortran compilers as part of my job as a Operating Systems programmer. Now I use C and Java mostly with a little bit of Fortran.

The teaching part came in when my company brought in a bunch of university students as interns (co-ops). The ones that got sent to the MIS department had to learn COBOL. The math and science interns used Fortran, and my buddy taught that. Back in those days you could look at a dump and debug a program rather quickly. I swear my boss could look at a dump and reconstruct the Fortran code.


48 posted on 07/07/2009 7:23:17 AM PDT by OrioleFan (Republicans believe every day is the 4th of July, democrats believe every day is April 15)
[ Post Reply | Private Reply | To 27 | View Replies]

To: Captain Beyond

I have found that using VB increases the possibility that the application will see the light of day. Java is a close second because there is a lot of Java code out there.


49 posted on 07/07/2009 7:25:42 AM PDT by AppyPappy (If you aren't part of the solution, there is good money to be made prolonging the problem.)
[ Post Reply | Private Reply | To 42 | View Replies]

To: OrioleFan
Back in those days you could look at a dump and debug a program rather quickly. I swear my boss could look at a dump and reconstruct the Fortran code.

I've written little BASIC programs without an interactive debugger--I mean, it was an Apple II after all--but I can't imagine having to write any serious software today without a debugger. I have tremendous respect for those who did. It feels like I'm cheating somehow. :-)

50 posted on 07/07/2009 7:40:01 AM PDT by TChris (There is no freedom without the possibility of failure.)
[ Post Reply | Private Reply | To 48 | View Replies]


Navigation: use the links below to view more comments.
first 1-5051-89 next last

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.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson