IntrospectiveSystems / xGraph

Introspective Systems, developer of xGraph, collaborative AI platform for data systems
https://www.introspectivesystems.com/
GNU Affero General Public License v3.0
14 stars 3 forks source link

Pid Instance specific instance of entity (ImpCache instancing) #74

Closed valyrie97 closed 5 years ago

valyrie97 commented 6 years ago

Potentially in es2018, likely in es2019, instance variable in classes will exist. Our analogy is usually Vlt. The problem for the end user to use this is that our entities o ly have one instance with different contexts passed to them. The least complex fix to allow this feature, would be to create imp instances for each entity. Performance consideration being ram. An alternative, would be to catch the state of the object when passed back in the imp eval for default state information. Methods could be pulled out of prototype, while default Vlt information could be put into a new dictionary, for setting up instances of that entity later. This would get hairy though, because we are clearly misusing the syntax, and further development of JavaScript as a language would likely only make it worse.

We should run some tests to see what the memory implications really are for converting the imp cache over to something with proper instancing.

http://2ality.com/2017/07/class-fields.html

valyrie97 commented 5 years ago

i think this was solved in instancing, at least as far as I can tell. maybe necro when es2019 drops in node lts