Dude, I know what you mean and I use Objeect.create already via vice-versa and no flags configuration but imho to better understand benefits we should consider better examples. I forgot in this one there is another thing to: call the init method over created instance. So, again, our good old ES3 is still better than future alchemies for that purpose, imho.
On Aug 14, 2009 10:08 AM, "Pauan" <pcxunlimi...@gmail.com> wrote: The example chosen was poor. It is true that the example could be trivially implemented right now. Object.create is most useful when either A) using inheritance without functions, or B) when changing the enumerable, writable, and configurable properties. In that case the extra code would be needed. The example didn't demonstrate either of those cases, so of course it looks like meaningless boilerplate. As was said, "You could even chose to make those non-enumerable or lock them with values." That was the point, I believe. It allows you not only to remove the "new" at the front of constructors, but also allows you to configure property flags. I already provided an example that shows how to do inheritance without needing constructor functions at all, which I believe was the primary intent of Object.create. On Aug 14, 1:47 am, Andrea Giammarchi <andrea.giammar...@gmail.com> wrote: > We are not under a unified VM (syntax not usable) and I cannot spot a single > benefit using two c... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subs... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---