typed objects and value types
Mark S. Miller
erights at google.com
Wed Apr 2 09:20:11 PDT 2014
On Wed, Apr 2, 2014 at 7:32 AM, Niko Matsakis <niko at alum.mit.edu> 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
> and the second details some (preliminary) thoughts on how one could
> build on typed objects to support user-defined value types:
Just a quick local editorial comment for now:
points.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!
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss