Catching typos or other errors in web-based scripting languages
Posted
by
foreyez
on Programmers
See other posts from Programmers
or by foreyez
Published on 2011-03-13T01:25:45Z
Indexed on
2011/03/13
8:17 UTC
Read the original article
Hit count: 274
best-practices
|scripting
Hi,
My background is mainly strongly typed languages (java, c++, c#). Having recently gotten back to a bit of javascript, I found it a bit annoying that if I misspell something by accident (for example I'll type 'myvar' instead of 'myVar') my entire script crashes. The browser itself most of the time doesn't even tell me I have an error, my program will just be blank, etc. Then I have to hunt down my code line by line and find the error which is very time consuming. In the languages I am used to the compiler lets me know if I made a typo.
My question to you is, how do you overcome this issue in scripting (javascript)? Can you give me some tips? (this question is mainly aimed at people that have also come from a strongly typed language).
Note: I mainly use the terminal/VIM ... this is mainly b/c I like terminal and I SSH alot too
© Programmers or respective owner