Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Wasabi?

On Joel Spolsky's blog, I often read something about "Wasabi" and if I check Wikipedia, it mentions that it's an in-house programming language.

What is it? Why do they use it? And why isn't it public?

like image 454
Thomaschaaf Avatar asked Jun 16 '09 19:06

Thomaschaaf


2 Answers

I would start with The Origin of Wasabi:

As the primary developer and maintainer of Wasabi, I've wanted to write a series of articles on Wasabi for awhile, and last week, I decided to talk to Joel about it. Today, I will start off with a short history of the language, and later, I will talk about some of its cooler features and where we want to take it in the future.

like image 56
Andrew Hare Avatar answered Nov 11 '22 00:11

Andrew Hare


Here's a recent update from 2013:

In the beginning, there was Thistle. Thistle was, at best, a glorified regex that converted ASP to PHP. It was written by an intern, and it showed.

Later, Thistle was broadened out into an ASP to PHP compiler. Compiler was still a loose term; there was still a lot of regex magic that relied on you following Hungarian apps notation. That said, I'm fairly confident that this version of Thistle did build an AST for code generation, which does mean it qualified as a real compiler.

That matters because this version of Thistle was extended out with two additional features: it could compile VBScript to JavaScript, and it added some conveniences to VBScript, such as macros (called picture functions (don't ask)), lambdas, and simplifications to the declaration system. Don't laugh too much at the former; the motivation was the same as for RJS or Seaside's JavaScript support. All three technologies are dead now, and for good reason, but it was modish at the time.

Later, when .NET came out, and VBScript was end-of-lifed, that left us with the option of rewriting the whole thing...or making a "real" compiler that could compile VBScript to .NET. Wasabi was born. Wasabi was written as a proper compiler that could translate VBScript to C# and (for legacy reasons; see above) JavaScript. Wasabi, unlike Thistle, was a real, full-blown compiler, in a CS sense, so it was feasible to add type inference, lambda expressions, and several other niceties, without spending too much effort. That said, the goal here was to allow transition: new components, with restrictions, could be written in C#. The idea was that, at least hopefully, Wasabi would gradually be deprecated.

So no. It was never meant to be a new language. It was always intended to be a stepping stone, a translator between languages, not a real language in itself. While it gained some additional features, that was to make working in the damn thing palatable--not to be a real language in its own right. Emitting C# and .NET IL are actually about equally easy if you have a real compiler, but Wasabi always emitted C#, specifically so that we could one day ditch the whole thing.

https://news.ycombinator.com/item?id=5281930

See also https://news.ycombinator.com/item?id=5281322

like image 37
Matthew Lock Avatar answered Nov 10 '22 23:11

Matthew Lock