philmasterplus
Active member
JS is a very dynamic language with a large amount of cruft. There are many quirks that make it hard to answer the question, "How many arguments does this function take?". To answer this with certainty, you'll have to do symbolic execution--no static analysis is going to cut it 100%.
(Microsoft had to devise a new language (TypeScript) that adds numerous constraints in order to make static analysis feasible. And they're putting lots of money behind it.)
This would be much easily solved by giving users a function that launches a popup dialog asking for input.
Edit: Just re-read gausie's comment and he already added
(Microsoft had to devise a new language (TypeScript) that adds numerous constraints in order to make static analysis feasible. And they're putting lots of money behind it.)
This would be much easily solved by giving users a function that launches a popup dialog asking for input.
Edit: Just re-read gausie's comment and he already added
user_prompt()
. Way to go gausie!