4 ms·
I haven't done any big projects with it, but I did use it for making a Firefox extension to archive sites. My biggest issue with it was the unpredictable way i
by dx87 8y ago
I haven't done any big projects with it, but I did use it for making a Firefox extension to archive sites. My biggest issue with it was the unpredictable way it would handle syntax errors, and how things were handled wasn't documented anywhere that I could find, you just kind of had to figure it out and remember for later. For example, depending on the function, passing the wrong number of arguments could 1). Cause the script to silently terminate 2).Cause the script to terminate with an error message 3).Execute the invalid function without mentioning the error, then return garbled output 4). Emit an error, skip the invalid function, but continue trying to execute the rest of the script.
It was frustrating enough to turn me off using languages that don't have compile time type checking.
- gnfurlong 8y agoPassing the "wrong" number of arguments isn't a syntax error in JavaScript. If you pass fewer arguments than declared parameters, the rest are implicitly undefined. The variations you were seeing probably just came down to how the invoked function handled that undefined value. I can still understand how inconsistency in behavior there might be confusing.