マイクロソフトのWeb Platform and ToolsチームのアーキテクトであるNikhil Kothariの個人ブログC#のコードをJavaScriptに変換するScript#のプロトタイプが公開されているマイクロソフトではAjaxフレームワークとしてATLASを開発しているが、それとは別にNikhilが個人で開発しているのが、このScript#だ。


Script# brings the C# developer experience (programming and tooling) to Javascript/Ajax world.



  • A clean language with the natural constructs. Today with script, you can go a long ways in simulating OOP (classes, interfaces, inheritance etc.), but the simulations are thrown at the face of the developer. Various C# constructs such as properties, events, and syntax for defining inheritance go a long way in making the code readable. Similarly modifier keywords like public vs. protected vs. internal, sealed vs. virtual etc. help define a better object model. All of this can be brought into the scripting world.
  • Easier refactoring and exploration. Script development could benefit immensely from the refactoring, and class browsing support already present in the IDE and in tools such as .NET Reflector. Both lend themselves to having a more manageable code base over time.
  • Ability to generate documentation. Again doc-comments from C# and the existing infrastructure could be leveraged here.
  • Ability to customize the script code easily. For example, I'll show debug vs. release and minimization below. The same idea could apply to building a version of the script that had more error checking or logging built in when you do need to run diagnostics. The approach could also be used to include instrumentation for the purposes of profiling, measuring code coverage, etc. Another interesting aspect of this project is that it will be able to generate script catering to multiple script profiles such as the current Javascript language, as well as Javascript 2 when it appears.


  • クリーンな言語による自然なコンストラクト。今日、OOPをシミュレートしているが、それは開発者の労力を無駄に費やすことになる。
  • リファクタリングと調査の簡易化。IDEや.NET Reflectorなどのようなツールによるリファクタリングやクラスブラウジングの利点を享受できる。
  • ドキュメント作成の簡易化。C#のコメントからドキュメントが容易に作成できる。
  • スクリプトコードのカスタマイズの簡易化。ダイアグのためのエラーチェックやロギング機能の付加が容易。