Re: Why are dictionary-typed attributes not allowed?

On 6/7/12 10:18 AM, Anne van Kesteren wrote:
> On Thu, Jun 7, 2012 at 4:11 PM, Boris Zbarsky<bzbarsky@mit.edu>  wrote:
>> There are a bunch of differences (the properties don't have to be on
>> prototypes, etc), but the real question you seem to be asking is why we have
>> dictionaries in the first place, no?  Why do we?
>
> We added them for object initialization. In particular for event
> constructors (but they are used elsewhere too now):
>
> new MouseEvent("click", {"clientX":23, "clientY":50})

Ok, then you're really asking why we allow returning them from methods. 
Why do we?

-Boris

Received on Thursday, 7 June 2012 14:41:36 UTC