need some clarification on compile-time type vs. run-time type

Brendan Eich brendan at mozilla.org
Tue Nov 13 14:17:55 PST 2007


On Nov 13, 2007, at 1:08 PM, P T Withington wrote:

> On 2007-11-12, at 02:04 EST, Brendan Eich wrote:
>
>>                                                 Imagine explicit
>> parenthese (not allowed because they mean union type, but pretend)
>
> I was just thinking how clever it was that parentheses meant both
> union type and expression grouping, because a union type of only one
> type is that type, so you could use parentheses here?
>
>>   x is (like T)
>
> What am I missing?

Heh, I was not paying attention -- you're quite right, thanks.

Separately, there seems to be some concern that users would want to  
parenthesize a value expression on the right of 'is'. Not sure why,  
but the exchange in

http://bugs.ecmascript.org/ticket/300

may provide that use-case. Or discussion here, which is a better  
venue for threaded discussions than simple-minded Trac.

Thanks again,

/be




More information about the Es4-discuss mailing list