@@toStringTag spoofing for null and undefined

Andreas Rossberg rossberg at google.com
Wed Jan 21 01:26:48 PST 2015

On 20 January 2015 at 20:26, Mark S. Miller <erights at google.com> wrote:

> On Tue, Jan 20, 2015 at 10:05 AM, Brendan Eich <brendan at mozilla.org>
> wrote:
>> Domenic Denicola wrote:
>>> Nominal-typing bad!
>> That "X-typing bad!" line is not helpful. (What is this, a sports/beer
>> commercial?)
>> Even structural typing fans such as Mark Miller have noted in their
>> research results the benefits of nominal types for certain use-cases.
>> Sometimes you need to know your implementation. This is the exception to
>> the rule, but it's not always and everywhere "bad!".
> Yes, but I would put it more positively. Nominal and Structural typing are
> about different things. Neither subsume the other. Nominal types are often
> misunderstood to be about the string-name of types or some equally
> non-generative notion of type, so I prefer to use the brand terminology.
> The classic Types are Not Sets <
> http://dl.acm.org/citation.cfm?doid=512927.512938>, IIRC, uses the term
> "trademarking" instead with the same meaning. If anyone has a link to the
> actual pdf, please post.

Indeed. In practice, all proper type systems combine both structural and
nominal elements. Both are needed. Many mainstream languages being overly
structurally challenged notwithstanding.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150121/73dbe750/attachment-0001.html>

More information about the es-discuss mailing list