On Mon, May 28, 2012 at 9:54 PM, John Tamplin <j...@google.com> wrote: > On Tue, May 29, 2012 at 12:45 AM, John J Barton > <johnjbar...@johnjbarton.com> wrote: >> >> > The only question is whether you get >> > an exception when you create discover() or when you call it. Your code >> > can >> > choose or not to treat adding properties to frozen objects as a fatal >> > error >> > or not, but the code is going to fail if r is frozen no matter what. >> >> This is not correct. (Well to be sure, I am assuming that you meant to >> write: >> "You can choose..." >> because, of course, 'code' cannot choose.) >> >> I do not have this choice. I wrote the code and I got the error. > > > You have the choice of using strict mode in your code, and getting the error > when you try and create discover(). Note that the decision embodied in your > code is independent of the decision made by the library writer, as the same > would apply if the library were written in non-strict mode. > > Regarding the original decision to have silent failures on modifying a > frozen object, that is just one of many quirks you just have to know if you > are going to write JS. Just like putting a line break after a return > keyword, you only have to do it once and you will remember not to do it > again.
So your stand is that we should continue to add quirks to the language? I guess not. So let's rewind to my original question. If the discussion about SES is leading us toward more things like freeze(), let's do a better job this time. jjb > > -- > John A. Tamplin > Software Engineer (GWT), Google _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss