

Is MS building a C# on JavaScript runtime? - cek
http://www.zdnet.com/whats-microsofts-father-of-cs-next-trick-7000004226/

======
drharris
This title is greatly misleading. The article (nor what it's talking about)
has nothing to do with a "C# on Javascript" runtime, and that would be
ludicrous. Anders is a language designer, so it makes a lot of sense he would
use his knowledge to help improve language support for the next big thing. C#
has matured; Javascript can still use some work.

~~~
cincinnatus
Oddly ms already has/had some sort of 'compiler'. Memory is fuzzy on it,
internal use and only used to build one thing, libs for messenger in browser I
think.

~~~
aschearer
You're thinking of Script# (<http://scriptsharp.com/>) and it's used at the
very least to develop the Office web apps as well as Exchange's Outlook Web
Access.

------
CodeCube
I'm hoping this is what ultimately became of Volta:
<http://en.wikipedia.org/wiki/Microsoft_Live_Labs_Volta>

Basically, you could write C# and mark different segments of the code as being
server side and client side. the client side code would be compiled to
JavaScript and run in the browser ... and you got full debug support across
tiers with the original uncompiled C# source.

------
noblethrasher
Erik Meijer has — for sometime now — advocated treating Javascript as a target
language.

This fact would be unremarkable except that a few years ago he advocated
bringing functional programming to the .NET platform and we ended up with
LINQ.

~~~
nrb
LINQ was never an attempt at functional programming; it's an exercise in
querying collections in a type-safe manner. Perhaps you were thinking of F#?

~~~
pjmlp
Maybe you should read this,

research.microsoft.com/~emeijer/papers/es012-meijer.pdf

LINQ is based in Monads.

------
swalsh
I LOVE C#... its a really great language. I use it every day, and have been
doing so for the past 4 years. But the thought of "Microsoft Javascript"
scares the shit out of me.

------
calinet6
"Microsoft could potentially add some new, interesting features to the
JavaScript standard"....

Scary! Don't do it Microsoft—don't screw this up again. We spent ten years
dealing with your "add some new, interesting features to the ??? standard,"
and we won't tolerate ten more. Standards are there for a reason. Do as you
will, but don't break compatibility with the greater web.

~~~
ssmoot
They did invent Ajax (AFAIK). So it's not all bad.

And IIRC Canvas was in Safari before it became standard (it is now right?).

I don't think vendor specific extensions are necessarily a bad thing. The
bigger issue with IE was just that it stagnated so long. If the IE6 to IE10
cycle, which happened over just a few years, would have happened when it
should of, I don't think we'd have nearly as much to complain about when it
came to browsers.

The Java situation was a bit different I guess, but honestly that may have a
lot more to do with the state of non-MS platforms not really having an
analogue to the J/Direct and RNI stuff? Wasn't really into Java at the time so
I dunno if that's fair or not.

~~~
calinet6
> They did invent Ajax (AFAIK). So it's not all bad.

May be true—but the mechanism for XMLHTTPRequest (and async requests in
general, through iframes or other ways) was around far before anyone had the
bright idea to do anything with it, so it was more of a stroke of luck.

~~~
ssmoot
I think you misread me. They (AFAIK) invented the first XmlHttpRequest
implementation years before anyone else. In fact, there's comments/submissions
on this site describing developer experiences with AJAX on IE before anyone
called it that.

I'm not claiming MS coined the term AJAX. They didn't. I am claiming some
bright people there saw the potential in it years before anyone else, and then
released an actual implementation you could use.

No idea who that was, if it was a lone shark sneaking it into the system, or
if it was a team/management effort that saw the potential in the idea and ran
with it, but that person deserves a cookie.

------
azakai
It would make sense for Microsoft to invest in tools to run C# or .NET code in
general in JavaScript, because letting people use Microsoft dev tools that
they are familiar with (Visual Studio) + letting them generate code that runs
on the web without plugins = win.

There are already some tools for this, Script# from Microsoft, JSIL and so
forth. Would be nice if Microsoft decided to officially support this approach
with something very robust.

------
pjmlp
Maybe they will announce an AOT compiler for C#, since they had open positions
for it some months ago.

~~~
eckyptang
There is one already - it's called ngen.exe and it shipped with v1.0 of the
framework.

[http://msdn.microsoft.com/en-
us/library/6t9t5wcf%28v=vs.80%2...](http://msdn.microsoft.com/en-
us/library/6t9t5wcf%28v=vs.80%29.aspx)

~~~
pjmlp
Thanks for letting a .NET developer that was part of .NET Beta Partners
program know about NGEN.

I meant a way to convert the application to binary that you can distribute
without having a CLR VM installed.

~~~
eckyptang
The OS usually ships with it or it can be bootstrapped easily. I don't see the
problem.

We deploy 4.0 framework with our desktop software as well. ClickOnce takes
care of the installation with the package manifest.

Github also do that with their GitHub for Windows app.

~~~
pjmlp
Usually standalone compilers have more ways to optimize.

Maybe it would be enough to make NGEN more configurable, on the other hand I
am yet to check the 4.5 improvements.

~~~
eckyptang
I'm not sure I want to tune stuff constantly myself.

Ngen is unchanged in 4.5. There were a few big changes in 4.0.

~~~
pjmlp
Microsoft says otherwise,

<http://msdn.microsoft.com/en-us/magazine/hh882452.aspx>

I just have not had yet the opportunity to research this myself.

~~~
eckyptang
Thanks for posting that - genuinely didn't see that :)

