4 ms·
I ported a project to TypeScript last week, and was very impressed with the language. I had rejected it out of hand in favor of coffeescript, but didn't realize
by embwbam 14y ago
I ported a project to TypeScript last week, and was very impressed with the language. I had rejected it out of hand in favor of coffeescript, but didn't realize how modern and expressive a type system they had created. Bug-catching gains were immediate, and while it took a little bit to get comfortable with its ins and outs, I'm excited about coding everything in JS again.
- gregwebs 14y agoI am impressed at how expressive interfaces and structural sub-typing are for Javascript, even though there is still no way to express a heterogeneous array. However, I have been very disappointed at how weak their type inference is and that they have no plans to improve it. http://typescript.codeplex.com/workitem/329 http://typescript.codeplex.com/workitem/329
- twp 14y agoHeterogenous arrays can have very poor performance on some JavaScript VMs, particularly Google's V8. If you can avoid them in performance sensitive code, it's a good idea to do so. For more information, see this excellent talk: http://v8-io12.appspot.com/ http://v8-io12.appspot.com/
- Locke1689 14y agoYou can't make the inference you suggest in the bug. It's not always valid. What if you set the variable in the function? This line of type inference is very problematic in languages like JavaScript. Your statement that you expected "modern type inference" makes it sound like you only have practical knowledge (maybe you've used ML or Haskell?), not theoretical background. You should review the literature.
- account_taken 14y ago100% agree. As much as I love CoffeeScript, the intellisense and type hinting is an invaluable aid to our team. TypeScript is the answer to team collaboration on large projects. There's no more guessing what the arguments are, whether an argument is an object or string. Source maps is icing on the cake.
- teamonkey 14y agoI would be absolutely delighted if type hinting made its way into CoffeeScript somehow.
- embwbam 14y agoYeah, my dream is a Typescript + Coffeescript dialect.
- BadDesign 14y agoHave you tried https://www.jetbrains.com/webstorm/ https://www.jetbrains.com/webstorm/ ? I find it quite good at intellisense.