Value types page started

Mike Samuel mikesamuel at
Thu Jan 28 15:42:10 PST 2010

This would be hugely useful for string interpolation since it would let
structured interpolation results transparently behave as strings in many

2010/1/28 Brendan Eich <brendan at>

> Value types would be objects that behave like primitives such as number and
> string: they are immutable or appear to be, so can be memoized and compared
> freely without object identity breaking value identity (in general; decimal
> cohort issues notwithstanding).
> The Ecma TC39 committee is in favor of exploring adding value types to
> allow library authors to implement types such as Decimal, Rational, Complex,
> Quaternion, RGBColor, etc. In order to be usable, value types must
> "overload", really dispatch from, operator syntax; they also need to extend
> literal syntax (e.g. 1.1m for decimal 1.1).
> I'm mailing to let folks know about a new wiki page. It's not a proper
> strawman proposal yet, alas -- it's my notes from an ad-hoc meeting last
> October. But it will become a strawman with enough work, including valuable
> feedback from es-discuss.
> Here's the wiki link:
> The issues raised include dispatch design, literal syntax, whether the
> built-in primitives can or should be recast as value types, and which
> operators are overloadable. Of course, this is an incomplete list of open
> issues.
> It references (via hyperlinks) thread-head messages on es-discuss with
> subjects containing "Operator overloading":
> Miller's double-dispatch proposal)
> Hansen's pretty-much-multimethods-but-with-prototype-mutation
> counterproposal)
> Orendorff's post about what should be overloadable)
> The meeting we had last October was productive, but I'm sorry to say we
> didn't have followup meetings since then. But we should, and I'll help keep
> the list and wiki updated. So please feel free to reply to this message if
> you have something to add. Thanks,
> /be
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list