IUBio GIL .. BIOSCI/Bionet News .. Biosequences .. Software .. FTP

Java or C++

Jari Oksanen jari.oksanen at helsinki.fi
Fri Apr 14 00:40:30 EST 2000

Malay wrote:
> I never told that you need to use visual C++. My choice would be wxWindows
> (if using C++) or Java for any program that will require portability as well
> as GUI. My original post was for that- I was not being able to choose
> between these two!

I have nothing against C++ nor Java, I just wondered that why somebody
fluent with C and perl would need them. Now I know better. wxWindows is
indeed a good choice for a portable GUI (I think it works even in Mac).
However, I think you do not need C++ to write wxWindows programs, but
you could use some other languages that are faster to write, easier to
debug and easier to maintain. My choice with wxWindows would be Python
which is available for your platform as well -- that is, it is available
free for MS Windows, Mac and several Unixes (sensu lato). It is a
scripting language which takes automatically care of C++ nuisances such
as memory handling (allocation, *freeing*, garbage collection).
Moreover, it is OO if you need this. I am not sure that it offers you
much new to perl though (aren't there wxWindows interfaces for perl?).
However, it is much more readable and easier to maintain than perl:
Python syntax is the cleanest I have seen. And the graphical toolkist
work. I have myself made some simple tests and found out that the
programs I wrote in Linux work without changes in MS-Windows as well.

Actually I think you could write a GUI with perl, although perl GUI
programs may be rare. This may not be so much a perl limitation but a
perl programmer limitation: it is so unixy, and perl programmer's goal
is to be obscure (`concise') and elitistic. Language is good, but the
programmers may be too deep in sh, sed and awk to appreciate mortal
users who prefer GUI. Forth readability and Basic speed...

You have GUI toolkits for C as well, but I don't know how portable they
are. GTK+ suggested by Nicolas Le Novere works with C indeed, but it is
mainly Linux. There is a Windows version now, but I think it is not very
mature. So it may be not good for portable programming or Windows
programming at the moment.

I have nothing against somebody choosing either Java or C++: each to his
own language. I have myself evaluted them some time again just to find
out that they are too much trouble for me. It seems that Java is often
even more voluminous than C++. However, (commercial) "builders" will
make the job much easier. Java code should be very portable, but in C++
you have to be very careful with choosing the GUI toolkit if you indeed
want to produce portable GUIs. If you do not have those "builders", you
might be much more productive with Python (again) which you can combine
with C functions for components critical for execution speed. 

Keep faith!

J.Oksanen -- UHLA (University of Helsinki at Lahti)
"GNU Emacs is evil." Linus Torvalds

More information about the Bio-soft mailing list

Send comments to us at archive@iubioarchive.bio.net