View Single Post
Old 04-03-2009, 06:10 PM   #14
AZed
Connoisseur
AZed has a complete set of Star Wars action figures.AZed has a complete set of Star Wars action figures.AZed has a complete set of Star Wars action figures.AZed has a complete set of Star Wars action figures.
 
Posts: 57
Karma: 307
Join Date: Oct 2008
Device: PalmOS PDA
Quote:
Originally Posted by bwaldron View Post
Can't agree at all WRT Python. Yes, it has issues with whitespace that some people freak out over, but the language makes it easy to produce clean, modular and very readable code.
I can't agree at all with respect to Perl, either. Perl makes it easy to write unreadable code -- but it also makes it fairly easy to write clean code, with very nice unit testing components, including one that checks for the presence of documentation, and another that actually checks code style against best practices. I wouldn't suggest it as a language to a novice coder, but for a third or fourth language, it's a language you can actually get things done in without too much fighting, with passable performance and rapid test/fix cycles. And you can write awful and unreadable code in any language.

As for the portability of C/C++, I have to guess that either you haven't tried to write much cross-platform code yourself, or that you seem to be under the impression that it's a good idea to rewrite everything in the world except the standard libraries from scratch, because other than those standard libraries, the code is *not* trivially portable, particularly where a GUI is involved, and in fact there's a whole cottage industry (the autotools/libtool chain) built around trying to bang it into something that will plausibly compile and run even inside a Unix environment, much less between Unix/Windows/MacOS. You can't just grab KDE, stick it on a Windows box, and run 'nmake' (or at least, if you can, there's an entire project dedicated to attempting to port it that could use your help). Unless I go out of my way to use non-portable W32-only components in Perl, I can be reasonably confident that my code will not require substantial porting effort to be usable anywhere Perl runs. I can't say this about C, C++, or Pascal. C++ is particularly bad: you can't even guarantee that code written in C++ will continue to link with libraries of the same version on the same operating system after a compiler upgrade, because the ABI has changed twice in the last half decade alone!

Java would be portable, but I find even well-written Java code difficult to read due to sheer verbosity, and again, there is no other language with as large a portable library collection as Perl. Python is only now catching up on the basics, Ruby is a long way off, and nobody else even seems to be trying.

When I wrote EBook::Tools, I didn't have to write a ZIP format parser/extracter, a bit vector routine, an INI file parser, a UUID generator, a complex date manipulator, a mime-type detector, an HTML tree parser, an HTML text wrapper, an image parser, a PalmDB parser/writer, or an XML tree builder that allowed for custom search methods, or a GUI builder. I didn't have to come up with a mechanism by which my library could be easily embedded into a CGI script on a webserver.

But quite seriously, if you can point me to a reliable method by which I can find portable versions of all of those components in C# (and by portable, I mean "an executable using them can be trivially cross-compiled or at least trivially recompiled and installed by the end-user with free software for any given Unix, MS Windows, and MacOSX"), I'll be happy to give it a close look. I understand that the Mono project has made great strides in recent years, so this might even be possible. I might even get over my distaste for all things Java if you can demonstrate that they do, in fact, have a decent library repository hidden away somewhere. I'll contemplate other languages, if you can demonstrate that they've got the properties I need.

I'm a firm believer in using the right tool for any given project. In this case, I happen to believe that the right tool was Perl.

Lecture aside, however, you didn't answer my question: what is it that you want to do with my library or the associated command-line tool that isn't working for you? Is it just that it isn't GUI-driven? I'm actually working on a GUI tool, but it's going very slowly as I started a new job and haven't had much time for hacking lately.
AZed is offline   Reply With Quote