Script# – Write JavaScript via C#

Nikhil Kothari, one of the coolest programmers on the planet (and one of the folks behind Atlas) came up with a brand new compiler which will basically allow you to write JavaScript via C#.
He named it Script# (pronounced: ScriptSharp).

This means you can now write JavaScript equivalent code with full IntelliSense, compile time error checking and full debugging enabled framework !!

Let me repeat (I’m hooked, sorry ;-)):

(1) No more need for alert(“…”) or debugger;
(2) You can compile the code and get typos errors before running the explorer and be spammed with yellow message boxes.
(3) IntelliSense people. IntelliSense. no need to open MSDN to find window or document members.
(4) I hate prototyping in JavaScript – The syntax is quite confusing and I’m lacking 2 must-have IDE features: “Go To Definition” and “Go To Reference”. Now you can do it all via C#.

The idea is pretty simple. You, the developer, write C# code and compile it. Behind the scene, the Script# compiler transforms your C# code into equivalent JavaScript and create a *.js file automatically for you. This (js)file will be download to the client (you can even use the new WebResource Attribute in ASP.NET 2.0) and that’s it.

You can find a set of demos, examples and of course -the binaries at Nikhil’s Blog.

Fantastic !


Oren Ellenbogen