When reading the ecmascript-harmony specification I cannot see anything about inspecting instances/objects in regards to find out information about their class and module. What I want to do is to be able to inspect a javascript object (that is an instance of a es6 harmony class) and find out:
- the name of the class it was instantiated from
- the name of the module the class was defined in
- the name of possible super classes and their modules
Does anybody know if this will be possible in es6?
If not is there a reason it would not be possible or preferred?
I can think of a possible issue with a classes not being as "tied" to their module as classes are to packages in other languages, i.e. Java. I.e. what would happen if ClassA is defined in ModuleA and ModuleB imports ClassA to later re-export it?