Where there was coffeescript to highlight functional features in JS in a time where most JS was imperative, maybe we'll see a language that takes the OO sugar away to, again, reveal the functional language that's underneath.
Where there was coffeescript to highlight functional features in JS in a time where most JS was imperative, maybe we'll see a language that takes the OO sugar away to, again, reveal the functional language that's underneath.
Modern JavaScript is cool, but it loses many of the benefits of old school JS:
- only runs on newer devices
- requires a precompile step
- more language to learn
- confusing concurrency model
- confusing inheritance mechanisms
- no incentive to learn to use closures, callbacks, and prototypes properly
If I was willing to accept all of those things, I would just use a straight up better language, like Rust or Haskell, and get the additional benefits of type checking and deterministic performance.
But I'm not interested in those things. I want a simple run-everywhere language for beginners to get started on. JavaScript used to be that, but modern JavaScript is not that language anymore.
So, I'm going to bring back ES5. Why not. Who's with me?
But sometimes that's what you want. I think a good use case is view models... You're not mutating anything, but you have a large number of consumers that are using different subsets of views on a piece of data. Constructing those by hand can be a PITA.
Although, it's dangerous there. "Lots of views on a piece of data" might be a way of covering up "several disparate pieces of data in one place" or "data that is playing two roles when it should be transmuted instead". So, it's good to be afraid of new.
I am still frequently decomposing a single index of objects into separate indexes of literals fairly often. I often get sucked into thinking something is an object when it's really just a few separate pieces of data indexed together.
I also use new for libraries that export something that isn't exactly a function, but more a point of reference. For example my browser-bridge module is a point of reference for the computation between a web request and response. It's not really an action, but it's a thin representation over a handful of low level things you want to do in that space. It's purpose is to wrap up a set of concerns.
Essentially, OO is generally bad in JavaScript, but sometimes it's good and in those cases new is nice.
0 - https://github.com/WebAssembly/gc/blob/master/proposals/gc/O...
https://github.com/SteveSanderson/Blazor
https://www.youtube.com/watch?v=MiLAE6HMr10
WebAssembly without native GC support is no different that targeting a real hardware CPU. One just has to implement it as well.
As soon as WebAssembly reaches a more mature state, expect the resurgence of plugins and this time around we won't be able to disable them.
Also if you bother to read the meeting minutes from WebAssembly meetings, developers from .NET team are present in such meetings.