Choosing a Programming Language
January 18, 2008
Here’s the succinct table of programming languages I
would consider for this project:
| Language | Implementation | Cost | Comment |
| C++ | Microsoft Visual Studio 2005 | $750 | The current PC standard. Microsoft changes its C++ spec with every new release of Visual Studio. MSVC 2008 is already out. |
| C++ Libraries | Qt by Trolltech | $1000 | Microsoft’s C++ libraries are appallingly bad. I cannot condemn them strongly enough. Although Trolltech does not do enough testing of their products, they are still far superior to Microsoft’s implementations. |
| Java | Sun Microsystems |
$0 | Superior to C++ in many ways, but a nightmare to support. Even *less* stable than C++, if you can believe it. |
| LISP | Corman Common LISP | $250 | Stable language. Easier to use for development than C++. |
| LISP | CLISP | $0 | Free implementation, but is it ready for prime-time? |
| LISP | Allegro Common LISP | $5,000 | A standard, but the price is obscene. |
Java has a lot to recommend it for this project. It is cross-platform and free. It has a large base of open source software (especially Lucene). And it isn’t published by Microsoft. Unfortunately, it is neither as fast as C++ nor as clean as LISP. If I chose Java, I would still need to use another language for the user interface.
I am disgusted with C++. The core specifications for the language (as implemented by Microsoft) are in constant flux. Due to the frequent changes in the language and in the compiler I am always afraid to revisit code more than a year or so old. Visual Studio 6 projects will not compile with Visual Studio 2003 will not compile with Visual Studio 2005 will not compile with Visual Studio 2008 et seq. ad infinitum.
See if you can follow me: C++ was created out of C by grafting objects onto it. The reason for doing this was, ostensibly, so that code would be reusable. The C++ compiler changes significantly every couple of years. Therefore no C++ code is reusable. Does this make sense?
I loathe const declarations: who gave the Nanny State the keys to my compiler? I loathe template declarations: by comparison C’s syntax was nice and clean! Here’s one:
template<int attributeCount>
typename Mesh<attributeCount>::MeshIterator
&Mesh<attributeCount>::MeshIterator::advanceToNextColumn(void)
{
if(iter == mesh.end()) return(*this);
do {
++iter;
} while(!atColumnBegin() && iter != mesh.end());
return(*this);
}
Can anyone make sense out of all this? Does it strike nobody’s notice that C++ is simply not designed for language extensibility?
Moreover, I cannot stand Microsoft’s penchant for Hungarian variable notation. m_cstrtVars make programs *more* readable!? The mind boggles.
Here’s a fun exercise: Take Microsoft’s documentation for a function, it doesn’t matter which one, and show it to a LISP programmer. Ask the programmer to figure out what the function is trying to do. Grab a beer and stand back!
So I will use LISP for most tasks. Unlike C++, LISP is designed for language extension. Unlike C++, LISP is designed with garbage collection in mind. Unlike C++, I can count on a program I wrote last decade running when I need it. I will use C++ for time-critical things and a graphical user interface. But I won’t use Microsoft’s libraries for GUI extensions, etc. I will use Trolltech’s QT. Trolltech has proven to have a dismayingly cavalier attitude toward pre-release testing, but at least they try to write code like grown-ups instead of high-school students or Stanford drop-outs, and they don’t use Hungarian variable names.
Which LISP will I use? I’d prefer Allegro CL, but I don’t want to pay the extortionate price. Corman Common Lisp looks pretty good – except for no SLIME support. For the time being I will use Corman CL and CLISP in tandem. Later, if it turns out to matter I will discard one or the other language.
RSS
Hi, this is a comment.
To delete a comment, just log in, and view the posts’ comments, there you will have the option to edit or delete them.