Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know. I was blown away by VS when I was researching what others were doing in this space. Their approach is also very clever -- there's an interesting talk about it at http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/DEV...


Care to mention what you found clever in their approach?


They basically run the scripts, instrumenting their Chakra JS engine to automatically abort overlong loops and overdeep recursion, and preventing all side effects outside of the DOM/JS runtime. And then use the actual types that occur in this run to do the completion. Plus, I guess, some added tricks that the talk doesn't go into, but which are necessary to make sure execution actually reaches the part of the program where you are trying to complete something.


Interesting. I wonder what they do to prevent side-effects. Perhaps it just knows to avoid any call that hits network or filesystem.


Does it ever get the types wrong? Just curious, I assume one wouldn't want to see the kind of code where VS gets the types wrong.


I was able to create situations where it failed to find any type for a variable, and when you have variables that may contain multiple types it appears to only find one type, but I wasn't able to make it report any actually wrong types. (But I haven't used it very much.)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: