4 ms·
Visual Studio autocompletes Javascript by executing the Javascript and using stub objects for anything that they don't actually want to run (e.g. window, XmlHtt
by WayneDB 15y ago
Visual Studio autocompletes Javascript by executing the Javascript and using stub objects for anything that they don't actually want to run (e.g. window, XmlHttpRequest, etc).
- ori_b 15y agoThat sounds incredibly baroque, complicated, and fragile.
- aaronblohowiak 15y ago.. in other words, javascript
- windsurfer 15y agoSure it is, but so what? Would statically analyzing the code really get you any further?
- ori_b 15y agoType inference would get you quite a way. Using a language that allows effective tooling would get you even farther.
- WayneDB 15y agoReplacing Javascript with a better language has not been possible thus far. There have been many attempts, but getting every browser maker to agree on something is like herding cats. So, when life gives you lemons, you make lemonade. We're stuck with Javascript. Personally, I think running the code while you're developing it is a brilliant way of dealing with the problem of how to do proper autocomplete on a dynamic language.