Flagged coding errors

I have coded in more legacy languages, and in those errors would be flagged. I have noticed that in HTML, JS and I think PHP errors are not flagged.

That seems like a step backward to me. Also the use of so much DOS command lines seems like going backward.

Anyone else noticed this?

I think I know what you mean.

For example, most of the languages I’ve used before JS were compiled languages. One nice thing about that is that the compiler would catch errors many before you ever ran it.

But with scripted language, the code isn’t inspected until it is encountered. In theory you could have some spelling error in some corner of code that isn’t encountered for years, if you don’t test properly.

This is just a feature of scripted languages. A line of code isn’t checked until it is time to run it. That’s just part of dealing with code that is compile line by line at run time - it won’t find the error until that line is run.

There are various linters that might help.

2 Likes