Galin Iliev's blog

Software Architecture & Development

LINQ but in ... JavaScript

Probably you've heard about C# 3.0 and LINQ features but can you imagine this can be done in Javascript too?!

Well this is possible - see example here.
It seems this have very good potential in current Web 2.0 wave.

Here is some info from their home page:

» What is jsc?

jsc is a decompiler or a cross compiler if you will. It is not a source-code parser nor an IDE. It is a command line utility like any other compiler. jsc was originally an anagram for csharp to javascript.

» How does it work?

The compiler extracts CIL from a .net assembly (latest javascript screencast, old screencast). It filters out the classes which are marked with the ScriptAttribute. It selects the target language and emits the source.

Each assembly defines which namespaces will be filtered in. Each class in these namespaces mustScriptAttribute, to be opt-in for jsc compilation. Therefore, previously built assamblies will not define be processed.

» What is the current status?
Currently, the jsc project is non-commercial, unsupported and experimental , but free to use :) If any of you manage to create something others would like to see with this, be it java games or ajax apps, post a comment on the blog.
» Who would like to use it?

  • php, javascript developers
  • java developers
  • developers
  • you!

» What are the limitations? (Will be adressed when the Orcas reaches beta)
  • operator ?? is not supported.
  • lock is not supported.
  • yield is not supported.
  • switch is not supported.
  • goto is not supported.
  • return within try catch finally is not supported.
  • try handler filter is not supported.
  • ref out is not supported.

Interested?! See Build AJAX and JavaME apps in the c# 3.0 language @ Sourceforge

Comments (4) -

  • zproxy

    4/20/2007 7:25:48 PM | Reply

    goot to be noticedSmile give it a try! Smile

    and soon also you will be able to write silverlight also! Smile

  • Galcho

    4/21/2007 10:42:48 AM | Reply

    Thanks for the links

    Congrats for the good job Smile