Yes, you heard me.
You can download the compiler and the c# project template.
By the way you should get the c# 3 Linq preview also.
Looking for feedback.
Yes, you heard me.
You can download the compiler and the c# project template.
By the way you should get the c# 3 Linq preview also.
Looking for feedback.
RSS feed for comments on this post. TrackBack URI
How can i install this.
Comment by Mello — July 5, 2006 @ 3:32 pm
Where do i have to copy those file?
Comment by Mello — July 6, 2006 @ 5:12 pm
I thought that I would not be surprised with this project after having worked with Script# for a few weeks, but this looks really interesting. I’ll comment more when I get more time to play with this.
Comment by Nik Donets — July 7, 2006 @ 6:59 am
Well, I had a little more time to play with this and here is my feedback.
This project is very different from Script#. The level of abstraction has been lifted a lot higher and is similar to the level of abstraction used in GWT. The ScriptCoreLib framework supplied with this compiler is very nice – very good implementation of W3C DOM, HTML and XML. Although I believe that frameworks that follow the standard are the right way to go, I also believe that such frameworks should also supply some mechanism to deal with browser specific quirks. For example, with this framework there is no way to access IE’s filter property of style object (located at object.style.filter). Another downside of this framework is size (209KB, even in packed form). Documentation is also lacking, but this can be fixed in future revisions.
Now about the compiler. The generated files are almost not human readable. This is largely because the method names as well as classes and their members are obfuscated (although some comments clarifying the method names can be found in the generated files). This means that debugging at the JS level is impossible. Even if the compiler did output the correct class names, members and methods, debugging at the JS level would still be really hard because local variables would still be obfuscated due to the fact that this compiler relies on the generated CIL instead of C# source files. So the only possible solution to this problem would be to debug at the C# level, but in order to accomplish this, a separate host environment would have to be written as was done with GWT.
Overall, this is a nice, unique approach to the problem of making JS easier (read “less error prone”) to write. When programming with this framework, it feels like you are actually programming in C#, unlike with Script# where it feels like programming JavaScript using C# syntax. One disadvantage of washing out the distinction between programming in C# and programming in JS is the loss of control over how each statement gets translated to its JS equivalent… and I enjoyed that type of control which Script# provided. The first thing I did when I started playing with Script# was see how each statement was translated to JS and the performance impacts introduced by such translation. I wanted to know exactly what was going on behind the scenes. With this compiler, it is close to impossible to figure out what happens at the JS level. One can only guess…
Comment by Nik Donets — July 10, 2006 @ 6:32 am
I forgot to mention that this compiler also supprots translating CIL into PHP, which I haven’t tested yet.
Comment by Nik Donets — July 10, 2006 @ 6:34 am
Great Feedback!
The next version (due to xmas?) will probably let js output to be human readable.
The variable names you seem to be missing, well the pdb file holds them, but they are not used in js or php output yet.
PS. The Compiler actually supports java, and it is highly readable, but i havent yet published it. Maybe i should? It gives array accessors and get setters, also the params keyword.
If anyone feels like it, they could try to do some sample projects, eg a card game, a tutorial etc.
I would do it myself, but i have not had the time, yet.
Cheers
Comment by zproxy — July 10, 2006 @ 4:27 pm
I would like to test, but how can i install the compiler?
Comment by Mello — July 11, 2006 @ 11:33 am
Mello, what do you mean by install?
It’s a simple download, unpack installment.
After that you just have to set the project to use the jsc.
Comment by zproxy — July 20, 2006 @ 3:15 pm
Ok thanks, i’ll try.
Comment by Mello — July 26, 2006 @ 10:20 am