I just got to the Appendix B at the end of your article, so I see you were aware of the strictness issue. The semantics of a failed assignment to a field of a value type should indeed just be the semantics of a failed assignment: if the assignment is performed by sloppy code, the failure is silent. If the failed assignment is performed by strict code, it throws.
On Wed, Apr 2, 2014 at 9:20 AM, Mark S. Miller <[email protected]> wrote: > On Wed, Apr 2, 2014 at 7:32 AM, Niko Matsakis <[email protected]> wrote: > >> I just wanted to let people on es-discuss know about two of my recent >> blog posts concerning typed objects. The first is a kind of status >> report: >> >> >> http://smallcultfollowing.com/babysteps/blog/2014/04/01/typed-objects-status-report/ >> >> and the second details some (preliminary) thoughts on how one could >> build on typed objects to support user-defined value types: >> >> >> http://smallcultfollowing.com/babysteps/blog/2014/04/01/value-types-in-javascript/ > > > Just a quick local editorial comment for now: > > ... > points[0].x = 1; > ... > But assigning to a field of a value object like temp has no effect, and > hence the assignment is lost. > > > Please assume (and state if you feel it is needed) that all example code > is strict code. Introducing abstractions, like value types, that cause > assignments such as this to fail would be insane if the clients of these > abstractions were sloppy. If the client code were sloppy, these failures > would be silent as you state, and the code would proceed on execution paths > that assume success. By assuming that client code is sloppy, you > unnecessarily burden, distract, and mislead the reader, as not one in a > thousand truly understands the semantics of sloppy mode. > > Substantive comments later. Quick reaction: I like it! > > >> >> Niko >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> > > > > -- > Cheers, > --MarkM > -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

