So far, it seems to me that language wise my best thoughts:
Python, I don't really 'like' python but I can do a tremendous amount of work in it compared to other languages, time wise. And it's fairly easy to implement and test stuff -- worst thing I can say about it is it's interpreted and the regular expression support is done via a standard library module. Although jython (compile to byte code, but compares to a smaller version of an old CPython release) and ironpython (python for .net clr) should help the former, and the api for regex ain't that bad, but sucks compared to Perl lol (like most languages seem to, that don't steal Perls syntax or likewise make it a core element of the language syntax). Python also can handle interfacing with other languages well enough between the CPython, Jython, and IronPyhon implementations.
Java, great syntax and fairly logical. The byte code is portable enough between Sun JVMs and it even has the portable Swing GUI toolkit, although I'd probably end up using SWT or the WxWidgets bindings. The bad things about Java, although you can compile to native machine code, ya need to get the GNU Compiler for Java (GCJ) working first. Regular expressions are done via it's libraries rather then syntax, and. Well the only _nice_ way of saying it, most of the tools with the JDK eventually piss me off, but I like the language aside from that. The only major con is it is as OOP-centric as I've ever seen, and it's that way by design.
C++, lower level then any of the others and offering the best level of interface to C code of any of them around ;-). I personally prefer Java's syntax over that of C++ but it still gets the job done. It's just a question of how often you want to press Shift while typing... One of the best things, the STL is quite nice and well enough supported now to be worth using. Although, in my experience when working around C interfaces, the STLs value can go out the window, but maybe that's just how long I went before using the STL. One plus, unlike Java or Python, you get a more traditional pointer, not to mention a few interesting things in the std::namespace and boost libraries. Not sure what shape exceptions support is like under various system compilers, but I don't think that I've ever seen C++ code using exceptions outside of examples or perhaps the FAQ :\.
Useful points of interest:
WxWidgets for the GUI -- portable to target platforms of most interest and in all three of the above languages (and a few more too).
libxml2 for XML -- portable to target platforms, but seems to only have C++ and Pyhon bindings easily available, libxmlj (for java) I think would need compiling and I haven't tried that under FreeBSD or Windows yet.
Semi-Native Regular Expressions -- Boost libraries for C++, Pythons own regular expression module, and ditto for Java (not that I like them).
std::string, str, and String classes -- basic string handling in C++, Python, and Java. Boost and WxWidges also provides wxString.
MySQL bindings -- database operations; quickly available for C++, Python, and Java (JDBC based). Using SQLite in C++/Python is also easy enough but I'm a bit leerly of Java-related connections for SQLite3.
As to the other stuff that was on my list:
C++ and Python provide suitable IPC systems, never have looked at Java in that light. Most of the stuff I need, is basically provided by the C libraries under POSIX systems and Windos, Python has a suitable interface to it, so I'm happy hehe.
Python has good enough built in support for common compression and archive formats. Whatever can't be done via java.util.zip hopefully could be done via JZlib, I'm not familiar with anyhing ZLib under C++, but there is always the traditional interface ^_^.
I haven't considered the network side that much. Although I sometimes find it a bit lengthly, I don't really mind working with the C-style sockets library I've used here, using the windows sockets library shouldn't be to far off from the ones used on *BSD and GNU for my needs (aside from headers/linking). Python has support for a number of protocols (and pwns Ruby on documenting the classes for most protocols IMHO), Java well enough out of the box, and both Python and Java provide usable interface to TCP/UDP. WxWidgets also has a few things as well but more limited, that might be worth looking at, since I'd rather like to use a similar interface in each language, while still leaving code that can be read.
As to the ease of use and deployment, that is always a tough question. Under FreeBSD and Debian at least, they are all 'easy enough'. Windows of course, always has to be the pain in the ass. But for total portability this is an AoR where Python excels. When it comes to deploying stuff, it gets tricker. Windows lacks a package manager and you eventually have to draw a line between what you're stuck bundling and what your stuck making a dependency. One of these days I need to look at py2exe and see how it would work out for what I've a mind to setup.
Big pluses:
Qt4 for C++ and (generally) Python is great and works on all my systems, QtJambi I've never tried on FreeBSD yet, but would be interesting if it works. The only thing I hate about Qt, the commercial license costs an arm and a leg :-(, but most of my needs fit within the (free) Open Source Editions license terms with a smile.
WxWidgets seems to be less painful then GTK+ under Windows while still supporting many languages, although GTK+ would probably be more fun to learn in my case. It also has nifty things, including string/regex classes.
MySQL and SQLite are generally portable and have bindings to other languages quick & easy enough. I've never used SQLite on a project, since I run MySQL on one of my own systems to service all my SQL-related needs ;-)
When it is all said and done, I really think Pyhon is the best choice... I dunno why or how, but it seems that way! Hmm, to re-dive into using Python for most tasks, or to get C++ crazy... Or live with using both side by side? For my own sake, I think I should sake fuck Java! But it is a great language in it's own right.
Oh well, maybe in a few months I'll have figured out which path to take. I can always make use of other languages and tools, but I very much need to find a "primary" set to work with!
think: switch(choice) { case PYTHON_ONLY: // Python becomes my primary language break; case CPP_ONLY: // C++ becomes my primary language break; case PYTHON_AND_CPP: // use both side by side break; default: goto think; }
No comments:
Post a Comment