Re:The First Browser Dedicated to Developers Is Coming
by blackoil on Monday November 03, 2014 @09:54AM
(#8551024)
I would like a strict mode in js and rendering engine, which shows syntax error like a compiler instead of eating them and failing later at random places. Ffat fingers and typos take disproportionate time while development.
[ Parent
| on HN ]
Re:The First Browser Dedicated to Developers Is Coming
by cpeterso on Monday November 03, 2014 @01:47PM
(#8552622)
Beyond ES5 Strict Mode ("use strict";), Firefox has a "javascript.options.strict" about:config pref that will log extra warnings (such as accessing undefined object properties) to the JS console. These warnings are not enabled by default because they are non-standard and can report false positives.
Re:The First Browser Dedicated to Developers Is Coming
by ianbicking on Monday November 03, 2014 @12:14PM
(#8551964)
When developing Firefox Addons they have logging that is kind of like what you describe – doesn't break running but problematic code, but does complain. I found the result unusable. Normal development involves using libraries like jQuery, Google Analytics, or whatever other framework that sometimes acts weird, or makes seemingly odd choices for compatibility reasons, or has code that is effectively dead for everyone but IE6 but does get loaded. And since I didn't write jQuery or whatever other library, I don't care about those warnings.
It could be useful if there was a way of indicating what scripts are actually under development, and therefore only complaining about things the developer can fix.
Re:The First Browser Dedicated to Developers Is Coming
by Yoric on Monday November 03, 2014 @10:04AM
(#8551078)
That sounds like a good idea for a dev version. Do you want to file a bug?
Re:The First Browser Dedicated to Developers Is Coming
by joshuacc on Monday November 03, 2014 @12:02PM
(#8551882)
You might be interested in looking at TypeScript: http://www.typescriptlang.org/
It does something very similar to what you're suggesting, adding in static type information for JavaScript and giving you compiler errors if you mess things up.