6 ms·
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.
by alain_gilbert 1y ago
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.
- harikb 1y agoIt shouldn't require a fancy forward-lookup-capable editor / language-server to show type. That is the point I am trying to make 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