Async Class

Claude Pache claude.pache at gmail.com
Tue Aug 27 16:36:46 UTC 2019



> Le 26 août 2019 à 17:11, Dimitrian Nine <dimtimeforever at gmail.com> a écrit :
> 
> Class is just function constructor that return object

Although in JS a class is represented by the same object as its constructor, I don’t think it is good to assimilate the concept of JS class and JS constructor. Indeed, a class consists not only of its constructor, but also of all its associated methods. This is what is suggested by the syntax:

```js
class C { 
    /* definition of all methods, not only constructor */ 
}
```

From that perspective, I understand very well what would be an “async constructor”; but an “async class” doesn’t make much sense.

—Claude
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190827/2c2ade5e/attachment.html>


More information about the es-discuss mailing list