Message from JavaScript discussions

April 2017

— The es2015 class syntax is literally just a function anyways

— 

Also I see a lot of people using objects when they could use a monad, there is a lot of ignorance of how powerful js functions are

— I will look over a article that stands for performance and said that `new` keyword on js is bad for performance because it binds an additional context to the execution of the statement, and then often discarded. That's because you should use `Promise.resolve` instead of making an instance with `new Promise`

Message permanent page

— I dont use new myself

— Although I haven't seen it eschewed with promises

— Using Promise.resolve vs new Promise cause entirely different control flow btw

— Any then methods will be invoked right away vs waiting for the promise function to throw resolve itself

Message permanent page

— Can't use Promise.resolve everywhere though

— Why's that?

— So why do you want real classes?

— Wrapping callbacks or eventemitters

— I dont