Dimtime

Results 17 comments of Dimtime

> Can you clarify how this differs from `async` vs non-`async` functions? e.g. `async` functions return promises, but do not use the word `promise` @bmeck This idea go from [syntax...

> might cover things outside the constructor @bmeck for me Async Class is fine and support fields is good. But what with Static then? ``` async class X { static...

> I'm open to alternative opinions @bmeck My idea about Promise Class that Class is sync, but with async constructor. For me more easy have two proposal, but if one...

Whoo! New version is ready: +more dynamic & universal standard (you dont need write class names - polyfill fill all for you) -lose private methods (cant execute private with this)...

@bmeck my last wrapper for me feels good only bad - this is not native version

Continue work... ``` js class PromiseClass { static $new=async(obj)=>{obj.promise='promise'; return obj;} constructor(...args) {return this.constructor.$new(this,...args);}//new }//class class AsyncClass extends PromiseClass{ static $new=async(obj)=>{super.$new(obj); obj.async='async'; return obj;} constructor(...args){return super(...args)}//new }//AsyncClass ```

And continue... ``` js class PromiseClass { static $new=async(obj)=>{obj.promise='promise'; return obj;} constructor(...args) { let Class = this.constructor; if (Class.__proto__.name) return this; return Class.$new(this,...args);}//new }//class class AsyncClass extends PromiseClass{ static $new=async(obj)=>{...

New version work like: 1) go sync tree 2) go async tree ``` js class PromiseClass { async $new(){this.promise='promise'; return this;} constructor(...args) { let Proto = this.constructor.__proto__; return (Proto.name) ?...

New version: less code, but without standard Create New ``` js class PromiseClass { static async new(...args){let o= new this(); await o.$new(...args); return o}; async $new(){this.promise='promise';} }//class class AsyncClass extends...

> Does the code pattern below solve the problem this proposal addresses? @brad4d [In other topic we discuss same ](https://github.com/tc39-transfer/proposal-async-init/issues/2) This example too easy: only one function - only one...