News for hackers. Stuff that matters.
Re:Announcing TypeScript 0.8.1 with Source level debugging by gregwebs on Friday November 16, 2012 @09:52AM (#4794052)
I 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
Re:Announcing TypeScript 0.8.1 with Source level debugging by twp on Friday November 16, 2012 @10:05AM (#4794091)
Heterogenous 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/

Re:Announcing TypeScript 0.8.1 with Source level debugging by Locke1689 on Friday November 16, 2012 @05:24PM (#4796193)
You 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.