Chad Perrin: SOB

6 April 2006

Mezilla Project: What language?

Filed under: Mezilla — apotheon @ 03:48

There’s been some discussion of programming languages to use for the new browser development project I’ve proposed. One thing we all seem to agree on is that we should avoid Java like the plague (“like the plague it is,” some might say). Other than that, there hasn’t been a whole lot of distinct statement of preferences. I’d like to change that, and maybe get something nailed down.

The most basic sort of “default” option, I suppose, would be to use nothing but C/C++ for it. It has been suggested by someone unconnected with the project that we might consider using a different language (one that’s more “fun” to use, more high-level powerful, and blessed with garbage collection whether it be “true” garbage collection or a work-alike mechanism such as Perl’s reference count management). That individual brought up OCaml as a possible replacement, which has the benefit of being a language whose parser creates persistent binary executables. As that individual pointed out, though, and as the project manager and chief architect (henceforth PMCA) also pointed out, garbage collection can be provided by way of the Boost libraries for C/C++, thus solving that problem at least.

Languages such as Perl, Python, and Ruby are other possibilities. Ruby is really not a very practical option at this time, due to issues of “maturity” of the language and its tools. The language itself would be great, but what surrounds it is just not quite up to par for this project, at this time. Python and Perl have the difficulty of requiring a means of Python or Perl parsing on the end-user computer, and Python has the added disadvantage of making my eyes bleed, though at least it works well and easily with C/C++ libraries. Perl has the added advantage of being quite familiar to most of the people involved thus far.

The Lisp family of languages would be quite high on Paul Graham’s roster of languages from which to choose, I’m sure. I respect the guy’s analysis of programming needs quite a bit, but there are a number of potential issues with using Lisp, such as the fact that I don’t think anyone currently involved is much of a Lisp hacker. I’ll start looking for more reasons to use Lisplike languages in the future when I have more familiarity with it myself, of course, but at the moment I’m less than lukewarm about using it for Mezilla (me + zilla, get it?). I won’t bother investigating it any further as a possibility unless someone else gives me compelling reasons to do so.

Based on my discussion of Lisp dialects, it should be obvious that I’m not too keen on trying to tackle Haskell for this project, even with its ability to compile to persistent binary executables. Ada, Prolog, and a slew of other languages are even further afield, and require proportionally greater inducements for consideration.

Making this a .NET/Mono project is pretty much a non-starter. I’d rather have a more portable application than that, installable in a self-contained binary where necessary so that reliance on runtime frameworks and the like is not an issue. Also, y’know, Microsoft, so no. This pretty much entirely rules out anything like C# and VB.

There’s always Javascript. The interpreter for Javascript is built into the Gecko rendering engine, which is a definite plus for Javascript as a possibility as a scripting language for browser design. It also benefits from what some regard as a better object model than C++ “enjoys”, and is generally a lot easier to write. It’s also kinda dog-slow, lacks libraries and other tools for this particular sort of project, and raises the specter of containment issues for Javascript parsing within web-served documents. The complications and performance issues strike me as, well, huge.

Object Pascal and Objective C are compiled programming languages with more regular structural features than C++. They have advantages and disadvantages. ObjC has been described as what we would have gotten if C++ were done “right”. Both Object Pascal and ObjC lack library support and widespread familiarity, though, and the tools (compilers, et cetera) do not tend to receive as much quality attention as those for C/C++. There’s also the simple fact that the GRE already uses C/C++, which might be a factor.

Anyone suggesting COBOL, VBScript, shell/batch scripting, or PHP should probably get his/her head examined. Anyone making joke suggestions like Brainfuck and Whitespace should prepare to be ignored or mocked. Assembly language is hereby disqualified by the running, by executive decision by me as the Cat Herder and Chief Bottle Washer (henceforth CHCBW, pronounced “chalk-uh-bow”).

Please, discuss. While you’re at it, check back at the initial project announcement, at the end of the users as programmers entry. Thanks for your time.

All original content Copyright Chad Perrin: Distributed under the terms of the Open Works License