Object.create() VS functions

2013-10-26 Thread Michaël Rouges
Bonjour à tous, `Knowing that every function is an object, I am surprised that the Object.create() method doesn't really allow cloning function. So I made ​​an implementation as follows: `Object.create = (function () { 'use strict'; var slice, curry,

Re: Object.create() VS functions

2013-10-26 Thread Brandon Benvie
On 10/26/2013 7:44 AM, Michaël Rouges wrote: Knowing that every function is an object, I am surprised that the Object.create() method doesn't really allow cloning function. Object.create creates Objects. You run into the same limitation when trying to create Arrays with Object.create (doesn't

Re: Object.create() VS functions

2013-10-26 Thread David Bruant
Le 26/10/2013 15:44, Michaël Rouges a écrit : Bonjour à tous, Bonjour, `Knowing that every function is an object, I am surprised that the Object.create() method doesn't really allow cloning function. I don't follow the logic of this sentence. In any case, the purpose of Object.create is to

RE: Object.create() VS functions

2013-10-26 Thread Nathan Wall
); // = 7 Make sense? Nathan Date: Sat, 26 Oct 2013 16:44:53 +0200 Subject: Object.create() VS functions From: michael.rou...@gmail.com To: es-discuss@mozilla.org Bonjour à tous, `Knowing that every function is an object, I am surprised

Re: Re: Object.create() VS functions

2013-10-26 Thread Michaël Rouges
Thank you for your answers. Sorry for my misnomer, I meant to copy a function, not to clone a function. In fact, it's been a while I do the technical research around the JavaScript , and this research has led me to realize that there is no feature to simply copy a function (or class) , including