For case like this, I'd say your text editor should definitely just be able to tell you right away that this variable is a "string" when you mouse over it.
var/declare x;
25 lines later
call f(x); // ** Reader has no idea what x is ... even though compiler has **
25 lines later
if (....)
x = "world" // infer type as string - this is bad