On Fri, Dec 19, 2014 at 2:34 PM, Gijs Kruitbosch <gijskruitbo...@gmail.com>
wrote:
>
> Can you give an example of a useful undefined property warning? Because my
> experience is the same as fitzgen's in that they are basically never useful
> to me.


I can't cite any bugzilla bugs, no. They're more useful while still
developing patches. Say you have a counter that's a property of your object
and you accidentally write "this.conter++". You'll end up with the property
set to NaN, which probably won't show up until some later time. Without
warnings, you need to stick print statements all over the place to figure
out where the problem is. The warning tells you exactly where to look.

 Writing front-end JS code for Firefox is generally a painful experience:
>> terrible error messages, often no filename or line number information, or
>> even no output at all. But I think we should be making things better, not
>> worse.
>>
>
> Agreed that we should be improving this, but I think we differ in that I
> don't think this change makes things worse - in fact, removing these is
> better, IMO, in that real errors now don't get hidden inbetween warnings
> pretending to be errors.
>

I'm definitely sympathetic to that point of view. I run with MOZ_QUIET and
MOZ_IGNORE_WARNINGS for this reason. It seems fine to me to have these
warnings be optional. I suspect that people who value static types are the
ones who like these warnings, and everybody else doesn't.


> We should be fixing the filename/line number info (fwiw, that part is
> unrecognizable to me in the general sense - have you filed bugs?)


Bug 1067942 is the worst example of that that I'm aware of right now. I try
to file these problems as I see them.

-Bill
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to