Support generation of ES6 classes
An attempt to replicate this without using classes can go as:
But trying to call this new constructor with `new B("bar")` triggers a browser exception: `Uncaught TypeError: Class constructor A cannot be invoked without 'new'`.
The root problem is that constructors can't be called as functions, this limits the reach of ClojureScript because it prevents the ability to extend these classes directly, and instead have to fall back to regular JS to handle these cases.
So this makes seems like we need some way to generate actual ES6 classes from Clojurescript (maybe a `defclass` macro?).
Some resources used in this exploration:
https://rete.js.org - library that makes use of native classes and depend on it for its usage
https://esdiscuss.org/topic/extending-an-es6-class-using-es5-syntax - some discussions around simulating es6 classes with es5
https://medium.com/@robertgrosse/how-es6-classes-really-work-and-how-to-build-your-own-fd6085eb326a - more docs around how classes works
But all the resources seems to deal with a time when native classes were not a thing, so they didn't have to deal with native constructor calls.