- From: Marcos Cáceres <notifications@github.com>
- Date: Mon, 23 Mar 2020 15:42:05 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 23 March 2020 22:42:17 UTC
marcoscaceres commented on this pull request.
> @@ -4741,9 +4740,15 @@ where [=map/keys=] are strings and [=map/values=] are of a particular type speci
};
</pre>
-Dictionaries are always passed by value. In language bindings where a dictionary is represented by an object of some kind, passing a
-dictionary to a [=platform object=] will not result in a reference to the dictionary being kept by that object.
-Similarly, any dictionary returned from a platform object will be a copy and modifications made to it will not be visible to the platform object.
+Dictionaries are always passed by value: the dictionary does not retain a reference to its
+language-specific representation (e.g., the corresponding ECMAScript object). So for example,
+returning a dictionary from an [=operation=] will result in a new ECMAScript object being created
yep, next sentence is good, nm.
I thought:
```
x.method({a: {b: {c: "d"}}})
```
copied the whole thing "deeply"? Or did I misunderstand?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/859#discussion_r396799972
Received on Monday, 23 March 2020 22:42:17 UTC