strawman:catchalls?

Zachary Carter zack.carter at gmail.com
Wed Nov 19 12:19:04 PST 2008


There was some talk about it in August here[1] and here[2].

[1]: https://mail.mozilla.org/pipermail/es-discuss/2008-August/006892.html
[2]: https://mail.mozilla.org/pipermail/es-discuss/2008-August/006903.html

Best,

Zach Carter



On Wed, Nov 19, 2008 at 2:43 PM, Jeff Watkins <watkins at apple.com> wrote:
> I'd absolutely second the catchall request. I currently jump through nasty
> hoops or restrain my designs simply to avoid the lack of this capacity. And
> if there were equivalents to valueForMissingKey and setValueForMissingKey in
> addition to a function catchall, that would be even better.
>
> On 18 Nov, 2008, at 10:19 PM, Peter Michaux wrote:
>
>> I don't see anything in the strawman wiki pages about a catchall
>> method for an object. I think this is something that is really missing
>> from the language and would substantially change the way some programs
>> are structured.
>>
>> The only ways I know of to currently get the equivalent behavior to a
>> catch-all now is to either make objects as functions of their
>> messages, or to make a "send" function. Both of these options mean
>> leaving the standard object.message(a, b, c) message-passing syntax
>> behind and use object("message", a, b, c) or send(object, "message",
>> a, b, c) syntax. Both of these are substantially slower (though
>> infinitely and enjoyably flexible.)
>>
>> Are catchalls candidates to be added to the strawman pages?
>>
>> Peter
>> _______________________________________________
>> Es-discuss mailing list
>> Es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>
> _______________________________________________
> Es-discuss mailing list
> Es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the Es-discuss mailing list