Harmony:classes static and private

Kam Kasravi kamkasravi at yahoo.com
Tue Jun 7 20:17:03 PDT 2011


Yes I puzzled over that a bit :)

I realize that types within a typed language need to provide certain guarantees in terms of schema, equivalence, etc. For the those of us more 'untyped' than others, could you expound very briefly on the type vs class distinction? Is it due to javascript's ability to morph a class definition both in terms of its properties and its prototype chain? I also ask due to Dave's suggestion in relation to modules that ES.next is much more amenable to static analysis (paraphrasing) which I would think an IDE would exploit to provide some level of type-checking. In Allen's mirrors article, it seems like types would be important to reflection.
Although wouldn't you know, I searched Allen's article (http://www.wirfs-brock.com/allen/posts/228) and he never once mentions 'type' :)

On Jun 7, 2011, at 6:47 PM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:

> Oops, obviously I meant: JavaScript subclassing is definitely not equivalent to subtyping.  
> 
> Time for dinner-at keyboard too long.
> 
> On Jun 7, 2011, at 6:34 PM, Mark S. Miller wrote:
> 
>> On Tue, Jun 7, 2011 at 6:11 PM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
>> 
>>  In a language as dynamic as JavaScript subtyping is definitely not equivalent to subtyping.
>> 
>> 
>> Wow, JavaScript is even more dynamic than I thought ;). 
>> 
>> 
>> 
>> -- 
>>     Cheers,
>>     --MarkM
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110607/7af48fd1/attachment.html>


More information about the es-discuss mailing list