5 ms·
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 wri
by bkjelden 12y ago
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.
- JeremyMorgan 12y agoAgreed, 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.
- nawitus 12y agoIt seems to be catching on reasonably well: http://blog.javascripting.com/2014/07/28/fastest-growing-new-languages-on-github-are-r-rust-and-typescript-and-swift/ http://blog.javascripting.com/2014/07/28/fastest-growing-new...
- judah 12y agoAs 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 https://news.ycombinator.com/item?id=8886588 [1]: http://ysnmn.org http://ysnmn.org
- TazeTSchnitzel 12y agoTypeScript was made by C# people, too :)
- _mtr 12y ago> 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
- jahewson 12y agoSource maps get you line numbers but not live objects - you're still stuck inspecting JS objects.
- _random_ 12y agoIs there ReSharper or Roslyn for TypeScript? In terms of powerful AND extensible refactoring tools.
- novaleaf 12y agothe 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)
- solomatov 12y agoReSharper supports TypeScript. See http://blog.jetbrains.com/dotnet/2014/03/17/more-typescript-support-in-resharper-8-2/ http://blog.jetbrains.com/dotnet/2014/03/17/more-typescript-... Also TypeScript is supported by IntelliJ family of IDEs.
- novaleaf 12y agoi 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)
- avodonosov 12y agoIMHO 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.
- bkjelden 12y agoThat'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.
- ossreality 12y agoNo. Just no.