7 ms·
I use pycharm with typescript, and either I have a new version or the pycharm plugin is far different to the webstorm one. All the refactoring options, jump-to-
by shadowmint 13y ago
I use pycharm with typescript, and either I have a new version or the pycharm plugin is far different to the webstorm one. All the refactoring options, jump-to-symbol, type hinting, type completion and inline-error checking work really well for me.
There are some pain points to be sure (modules, generics that don't quite work), but:
- Emits known good javascript patterns, preventing javascript's typical '50 ways of doing something'.
- Interacts cleanly and nicely with the existing javascript ecosystem.
- The emitted javascript runs on old browsers, and is only marginally bigger than the source code, smaller sometimes, if you use interfaces
- Clean module system (a little irritating to use perhaps, but still) supporting AMD and CommonJS (this is absolutely the future for JS dependencies).
- Open source, installable compiler using npm.
What's the alternative?
- native JS <-- Not a bad choice, needs discipline to maintain code quality
- coffee script <-- Interacts poorly with existing js ecosystem
- dart <-- Doesn't run on old browsers, poor interop
- emscripten <-- Massive output, poor interop
I cant say I'm any hurry to add C# into the mix, but typescript has impressed me thus far, despite being from Microsoft.
- camus2 13y ago> - coffee script <-- Interacts poorly with existing js ecosystem Why do you think that ? Coffeescript is basically javascript without the bad parts.
- shadowmint 13y agoReally? Maybe I should have another closer look at it. I saw this from the homepage: Embedded JavaScript Hopefully, you'll never need to use it, but if you ever need to intersperse snippets of JavaScript within your CoffeeScript, you can use backticks to pass it straight through. ...and struggled to do basic things like interact with handlebars and jquery, and figured it was one of those 'works with other things written in coffee script' things. Not so? Why are there so many SO questions about 'how do I use coffee script with XXX'? (where XXX is some existing javascript library, eg. jquery)
- camus2 13y agoWhat specific problem did you have with jquery and coffeescript, or handlebars and coffeescript ,that's my question to you. Coffeescript is a 100% compatible with javascript , the fact that you can embed javascript in coffeescript is a feature of the language,not a problem. > I saw this from the homepage: So what ? > Why are there so many SO questions about 'how do I use coffee script with XXX'? How does it mean coffeescript has compatibility issues with javascript ? You are just bashing coffeescript without any real argument against it. There are arguments against coffeescript , compatibily with javascript is not one of them. You dont know coffeescript. If you knew CS you would not have these bogus arguments against it. Coffeescript fixes Javascript bad parts , Typescript doesnt,it just add a few keywords and compile time type checking to the language, which is unecessary. Typescript on the other has compatibility issues with javascript libraries since one needs ambient declarations to use 3rd party libraries, some extra work not needed with Coffeescript.
- ben336 13y agoCan you give an example of Coffeescript interacting poorly with the existing js ecosystem. I've seen complaints about the need for a build step, but since it compiles down to vanilla javascript, it works everywhere JS does, and its not hard to mix the 2 on a project if necessary.