In this context, there are two things you might mean by "throws":
a) That this delete is an early error within the evaled program, and
therefore throws before any of the code in the evaled program executes.
b) That the delete is a dynamic error that happens when the delete
executes, and therefore that the evaled code prior to the delete has
executed before the error is thrown.

-1 on #b.

Assuming you mean #a, between #a and silence, I'm torn. Here are pros and
cons:
pro #a: The program is wrong. Silence fails to bring it to anyone's
attention, making the mistake less likely to be fixed. And making it more
likely the program's execution deviates from author's intent.
con #a: Silence on sloppy wrong programs are least surprise, and is
arguably the most vivid different between sloppy and strict.

I doubt there's any sensible choices other than #a and silence.



On Mon, Feb 17, 2014 at 12:52 PM, Allen Wirfs-Brock
<al...@wirfs-brock.com>wrote:

> So, #3 appears to be the winner.
>
> Given that,  can we also agree that  this is throws (or at least that the
> delete does nothing):
>
> eval ("let x=5; delete x;");
>
> (bug https://bugs.ecmascript.org/show_bug.cgi?id=1111 )
>
> Allen
>
>
>
> On Feb 17, 2014, at 8:02 AM, Erik Arvidsson wrote:
>
> I'm also fine with 3.
>
> On Mon Feb 17 2014 at 10:39:47 AM, Jeremy Martin <jmar...@gmail.com>
> wrote:
>
>> Happy to concede to #3 on my end.  Just wanted to be clear that it seems
>> to be optimizing for future happiness vs. least surprising behavior (which
>> isn't a bad thing).
>>
>>
>> On Mon, Feb 17, 2014 at 10:26 AM, Jorge Chamorro <jo...@jorgechamorro.com
>> > wrote:
>>
>>  On 17/02/2014, at 13:42, Andreas Rossberg wrote:
>> > On 15 February 2014 06:10, Brendan Eich <bren...@mozilla.com> wrote:
>> >> Allen Wirfs-Brock wrote:
>> >>>
>> >>> Another consideration in the back of my mind is that there may be
>> useful
>> >>> to implementors to knowing that let/const/class declaration are never
>> >>> dynamically added to a non-global environment.
>> >>
>> >> +lots, this should be front of mind.
>> >>
>> >> In a block, we want the bindings local to that block to be statically
>> >> analyzable. We want no non-local mode effects. So, #3 still wins.
>> >
>> > Strongly seconded.
>>
>> And even thirded.
>>
>> --
>> ( Jorge )();
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss@mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>
>>
>>
>> --
>> Jeremy Martin
>> 661.312.3853
>> http://devsmash.com
>> @jmar777
>>
>> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


-- 
    Cheers,
    --MarkM
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to