writing your own language is bad, m’kay ? September 13, 2006

Posted by Imran Ghory in Software development

Joel Spolsky‘s been at the centre of some recent controversy over his VBScript extending language Wasabi — what really shocks me is not that he wrote his own language, but the appalling lack of ability of those attacking his decision to give a coherent argument against it. Forget C – universities obviously need to go back to teaching students rhetoric.

Even some generally intelligent high-profile bloggers such as Jeff Atwood attacked it without giving any justification other than a vastly over-simplistic “writing your own language is bad, m’kay ?”.

Out of the hundreds of people who have commented on it I’ve not seen one person suggesting a reasonable alternative for Joel’s business problem.

So I’d like to throw out the question what would you do in the following situation:

You have a product which is deployed to client web-servers and is written in VBscript, your market research has indicated that having your product work under more web environments (i.e. non-VBscript ones) would bring in significantly more sales. Having looked into it you find that getting the clients to install a new run-time environment or language is unviable – too many are unwilling to do this. So you have to use something that’s already installed almost everywhere (or at least everywhere you can’t deploy VBScript) – a quick look at Netcraft will tell you that the answers PHP.

So now you know you need to port your app to PHP, how would you do it ?

You could do it by hand and then forever after have two codebases you’ld have to keep in sync. Anyone who’s ever tried to do that before will know down that path lies years of pain and maintenance nightmares.

You could make a framework in both languages which is data driven, trying to move as much of your application code as possible into the data. But this is essentially the same as coming up with a new language and writing an interpreter for it in both PHP and VBscript.

You could write a program which turned your VBScript into PHP. This seems essentially the route Joel took (adding some extra functionallity while he was at it).

Anyone have any other suggestions for how you would solve this problem ?

Because frankly Joel’s solution is the best programming solution to his business problem that I can think of.