Tristan Zajonc wrote:
One clarification on the value objects proposal... The JSConf slides say that immutability is implemented as an implicit Object.freeze(this) on return in the constructor. Is this meant as shorthand for a deep freeze?

Yes, although depth may be hard to generalize. A deepFreeze can be self-hosted in ES6 using Object.freeze and weak maps. But I'm still considering using only typed objects for state, which have the advantage of being flat.

More in the strawman when I update it (next week or the week after).

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to