Live data from Hacker News

New C# to Javascript compiler released

erik-kallen.se

1–10 of 81 posts

Re: New C# to Javascript compiler released

#2
The very best of luck when it comes to debugging the code when it is running in the browser.

Maybe your experiences are different to mine but I avoid such abstractions wherever possible.

It has become fashionable to say things like "JavaScript ... is not well suited for developing large systems" - indeed so much so it often passes without comment but when it is JavaScript that will be run by the browser then JavaScript is what you should be writing.

Re: New C# to Javascript compiler released

#3
post #2

The very best of luck when it comes to debugging the code when it is running in the browser. Maybe your experiences are different to mine but I avoid such abstractions wherever possible. It has become fashionable to say things like "JavaScript ... is not well suited for developing large systems" - indeed so much so it often passes without comment but when it is JavaScript that will be run by the browser then JavaScri…

Actually, debugging is quite simple. The generated script (unless minified) is very similar to the input code. Are you also against other options such as CoffeeScript? And do you think it is very hard to debug higher-level languages such as C, C# or Java because "if you are writing code to run on a processor, it is assembly you should be writing"?

Re: New C# to Javascript compiler released

#4
post #2

The very best of luck when it comes to debugging the code when it is running in the browser. Maybe your experiences are different to mine but I avoid such abstractions wherever possible. It has become fashionable to say things like "JavaScript ... is not well suited for developing large systems" - indeed so much so it often passes without comment but when it is JavaScript that will be run by the browser then JavaScri…

I agree. Having had used GWT and other similar cross compiling to javascript type tools, it's often a huge problem in debugging than if you just write a short javascript code. No offense to the author but projects like these that try to fit a static language like Java/C# that run in their own managed environments into dynamic world of Javascript fail miserably.

I fear projects like these tend to attract programmers who know C#, Java but don't quite want to learn javascript and they don't even try to do it once they run out of runway in this tool. And, the code becomes undebuggable, bloated on the browser.

Nothing against other languages, they're amazing at what they do. But, javascript is, for better or worse, the language of browsers. And it's really powerful with established best practices to organize, debug code + great tools (thanks to Chrome Team @ Google and Mozilla).

From a programming languages/compilers standpoint, it definitely tickles my fancy :)

Re: New C# to Javascript compiler released

#6
post #2

The very best of luck when it comes to debugging the code when it is running in the browser. Maybe your experiences are different to mine but I avoid such abstractions wherever possible. It has become fashionable to say things like "JavaScript ... is not well suited for developing large systems" - indeed so much so it often passes without comment but when it is JavaScript that will be run by the browser then JavaScri…

"... but when it is JavaScript that will be run by the browser then JavaScript is what you should be writing."

So by that logic, one shouldn't be writing C# that targets the CLR either, but should rather be coding in MSIL directly. Mmm, no thanks!

Re: New C# to Javascript compiler released

#7
post #2

The very best of luck when it comes to debugging the code when it is running in the browser. Maybe your experiences are different to mine but I avoid such abstractions wherever possible. It has become fashionable to say things like "JavaScript ... is not well suited for developing large systems" - indeed so much so it often passes without comment but when it is JavaScript that will be run by the browser then JavaScri…

Actually, debugging is quite simple. The generated script (unless minified) is very similar to the input code. Are you also against other options such as CoffeeScript? And do you think it is very hard to debug higher-level languages such as C, C# or Java because "if you are writing code to run on a processor, it is assembly you should be writing"?

Well, he actually said "debugging code when it is running," which a lot of people find valuable. Of course you can debug anything in the looser sense of the term, but tools like debuggers make the process more productive.

And yes, many people are against Coffeescript too for precisely this reason.

Re: New C# to Javascript compiler released

#8
post #7

Earlier quoted context omitted.

Actually, debugging is quite simple. The generated script (unless minified) is very similar to the input code. Are you also against other options such as CoffeeScript? And do you think it is very hard to debug higher-level languages such as C, C# or Java because "if you are writing code to run on a processor, it is assembly you should be writing"?

Well, he actually said "debugging code when it is running," which a lot of people find valuable. Of course you can debug anything in the looser sense of the term, but tools like debuggers make the process more productive. And yes, many people are against Coffeescript too for precisely this reason.

You can use the Chrome debugger just as if you had written the Javascript directly.

Re: New C# to Javascript compiler released

#9
post #2

The very best of luck when it comes to debugging the code when it is running in the browser. Maybe your experiences are different to mine but I avoid such abstractions wherever possible. It has become fashionable to say things like "JavaScript ... is not well suited for developing large systems" - indeed so much so it often passes without comment but when it is JavaScript that will be run by the browser then JavaScri…

Actually, debugging is quite simple. The generated script (unless minified) is very similar to the input code. Are you also against other options such as CoffeeScript? And do you think it is very hard to debug higher-level languages such as C, C# or Java because "if you are writing code to run on a processor, it is assembly you should be writing"?

The question is how similar? Coffeescript has come a long way in keeping symbols similar enough to be debuggable and not polluting the javascript namespace. Once the code grows to a certain size, tracing from line number in error to a line of code in your source becomes non-trivial.

Also, since this has been a constant pain for me when using Google Closure compiler, how do you anticipate this tool working with existing javascript libraries? Hypothetically, can I port a C# application ( a reasonable/simple one, not with crazy winforms and stuff)? Is there a spec you're adhering to?

Re: New C# to Javascript compiler released

#10
post #2

The very best of luck when it comes to debugging the code when it is running in the browser. Maybe your experiences are different to mine but I avoid such abstractions wherever possible. It has become fashionable to say things like "JavaScript ... is not well suited for developing large systems" - indeed so much so it often passes without comment but when it is JavaScript that will be run by the browser then JavaScri…

>when it is JavaScript that will be run by the browser then JavaScript is what you should be writing.

Of course, source maps will soon make this point largely moot.

Post reply on HN