> Really, I can't remember some _very_ needed use-case of exactly changing
> `__proto__` dynamically.
>
> First, yes, I'm analyze it from the theoretical design viewpoint.
> ECMAScript borrowed __proto__ from Python. It's called __class__ there --
> and it's also mutable. Though, I also can't remember cases when I was needed
> to change the __class__ of an object dynamically at runtime (probably who
> program Python more than me can provide some really useful cases), but such
> an ability is (maybe to create some useful factories which may _classify_
> objects at runtime or sort of).
>
>
Yeah, theoretically it's interesting. I kind of put that under abstraction
:)


> I mean, I know what __proto__ is and does (so please no lectures on it,
> thanks!)
>
> Did you confuse me with someone? ;) Do I look like I'd give *useless*
> lectures?
>

No! I kind of fired this as a general question to the list, not specifically
to you. So please don't take this as a personal comment :)


> but how often do you really need it?
>
> Yeah, I think for exactly (cross-) browser environment, the problem (with
> "give us a mutable __proto__") is really imaginary and I don't remember some
> the very needed cases (except mentioned above, e.g. with sub-classing an
> Array -- it's the only normal way today). Though, I used it normally and
> often for inheritance in only SpiderMonkey-based project (patching
> Thunderbird).
>

Yeah. Thanks.

-peter

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to