Hacker News new | comments | show | ask | jobs | submit login

I would encourage anyone looking at a C# to javascript compiler to check out typescript first.

I've seen projects use a compiler similar to this, and while writing C# sounds great to developers who already know C#, the differences between the C# source and the generated JS make debugging and maintenance difficult.

In my experience typescript provides C# developers much of what they are looking for - type safety, familiar class definitions, etc - while still being very easy to debug.




As a former C# guy who moved to the web, I can say with confidence this is true: TypeScript is a great language for building great web apps.

My "Show HN" submission yesterday[0], the web app for helping homeless youth find beds and shelter[1], is written in TypeScript.

[0]: https://news.ycombinator.com/item?id=8886588

[1]: http://ysnmn.org


TypeScript was made by C# people, too :)


Agreed, I wish people would look at TypeScript more in general. It really is a great product that doesn't seem to be catching on very well.

Like many others I think the future of JavaScript is going to be treating it like bytecode. Write your application in whatever language you want for developer convenience and debugging, them push it out to javascript for processing. Seems to be where things are headed.


It seems to be catching on reasonably well: http://blog.javascripting.com/2014/07/28/fastest-growing-new...


IMHO the reason for such a compiler is sharing code between client and server. From that standpoint your advice is reasonable for C# programmers only if they are ready to abandon C# altogether and switch to node.js on server.


That's true - if you have some sort of business logic you want to run on both client and server, this or Script# could be very useful.

But if you're looking to write C# in the browser because you love C# and have heard JS is terrible (a BIG factor I've seen used when pushing tools like this), I'd look at typescript first.


> while writing C# sounds great to developers who already know C#, the differences between the C# source and the generated JS make debugging and maintenance difficult.

Isn't this solved with source maps?

> DuoCode automatically generates source mappings


Source maps get you line numbers but not live objects - you're still stuck inspecting JS objects.


Is there ReSharper or Roslyn for TypeScript? In terms of powerful AND extensible refactoring tools.


ReSharper supports TypeScript. See http://blog.jetbrains.com/dotnet/2014/03/17/more-typescript-...

Also TypeScript is supported by IntelliJ family of IDEs.


i love resharper for C#, but it's typescript support is... lacking. Easier (and better intelisense discovery) to use the official VS plugin for Typescript (and comes built into the newer versions of VS)


the new VS 2015 preview uses Roslyn for typescript. honestly I prefer VS 2013 better right now, the VS 2015 preview crashes regularly, plus is missing important extensions (and the Web Essentials plugin for it misses features such as TSLint)




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: