David Bruant (2013-09-06T16:14:28.000Z)
Le 06/09/2013 18:06, Brendan Eich a écrit :
>> Domenic Denicola <mailto:domenic at domenicdenicola.com>
>> September 6, 2013 8:48 AM
>> What is the value of allowing you to send in values via `.next(v)`, 
>> or send in exceptions via `.throw(e)`?
>
> An iterator does not reject .next calls that pass a value.
fair enough (sorry about my earlier message on .next. It's part of the 
iterator interface, not sure why I wrote that)

> As for .throw, don't do that unless you want what you get. "Doctor, it 
> hurts when I ...."
Why exposing something that's meant to be a footgun? Just don't expose it?

David
domenic at domenicdenicola.com (2013-09-17T20:00:37.559Z)
Le 06/09/2013 18:06, Brendan Eich a écrit :

> An iterator does not reject .next calls that pass a value.

fair enough (sorry about my earlier message on .next. It's part of the 
iterator interface, not sure why I wrote that)

> As for .throw, don't do that unless you want what you get. "Doctor, it 
> hurts when I ...."

Why exposing something that's meant to be a footgun? Just don't expose it?