On Fri, Jul 28, 2006 at 01:34:31AM -0000, Greg Sabino Mullane wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Unthreaded: in a clear field, Chad, what *would* you have implemented MediaWiki in?
Dunno about Chad, but I would have implemented it in Perl, of course. With perhaps bison and Inline::* where needed.
That's actually pretty much my answer.
And why?
That's a loaded question. :) More experienced people familiar with the language available for development. Namespaces. A mature database API. No php.ini mess. Unicode. Lexical variables. Real hashes. "use strict". Consistent naming, use of case, and return values. The ability to use qq{}. Perldoc[1]. Real references and data structures. Good comparison operators. XS. True object orientation.
Those are pretty much my reasons. Are you preplagiarizing me? (ahem)
However, PHP is what we got, and MediaWiki is pretty well written and head and shoulders above 99% of the PHP apps out there. Once I finish Postgres support for MediaWiki, I'll be converting it to Perl. Just don't hold your breath. :)
Ditto that first sentence. Cheers and applause for the second. I wasn't planning to, with regard to the third.
As for original content, rather than just metoos . . .
Another option, besides Perl, that appeals to me is Ruby -- and for many of the same reasons as Perl (though it lags in some areas, such as number of available developers and volume of existing code that could be used). It also has some benefits that distinguish it from Perl, such as a far better syntax for its object model and a tendency to encourage readable code more readily (that doesn't mean you can't write equally readable Perl, just that the language's syntax tends to "encourage" it more than Perl's). Both languages have thoroughly excellent regex engines, with Perl's having perhaps a slight advantage, easily made up by Ruby's facility with iteration. On the other hand, there's the simple fact that Perl execution performance kicks butt all over Ruby, and perhaps every other high-level, reasonably dynamic, comparable language, for most purposes.
If I knew enough of some Lisp to be functional (ha ha, 'scuse the pun), I might lean in that direction as well.
I like the proposed idea of writing one or two core, high-load components in C, or even (if we're really adventurous) something better performing like Ada, though that's probably really pushing it. Since I don't much enjoy looking at C code, though, I might just ask someone else to write the C, so I guess *I* in particular might not implement any of it in C. Eh.
Perl really strikes me as the clear winner, overall, with Ruby a close second about a hair's-breadth behind it.