I'm not a fan of OOP, and I'm not strictly bound to pointless or functional programming, but the given an example is, at least to me, not a good example.
Also, the compiled code isn't shorter or faster than the code we've used writing for years.
The Server.listen example is as fast as Expressjs while Server.core example is up to 4 times slower.
Note: benchmarks are always wrong because so many invisible (implicit) variables have an impact on them.
In my opinion, it's not the best example to show the OOP style server code.
Server.core + performanceHooks -> Babeljs -> repl.it
repl.it/repls/GrowingBustlingScales
Server.listen + performanceHooks -> Babeljs -> repl.it
repl.it/repls/LameUpsetPdf
Expressjs + performanceHooks -> Babeljs -> repl.it
repl.it/repls/GrubbyMediumConversion
I'm not a fan of OOP, and I'm not strictly bound to pointless or functional programming, but the given an example is, at least to me, not a good example.
Also, the compiled code isn't shorter or faster than the code we've used writing for years.
The Server.listen example is as fast as Expressjs while Server.core example is up to 4 times slower.
Note: benchmarks are always wrong because so many invisible (implicit) variables have an impact on them.
Thanks Denny I understand now