You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need some way to add support for namespaces, so that two separate scripts in the same JS context can each use Take and Make without collision.
Perhaps the syntax could be:
Make"someNS", "A", A
Take"someNS", ["A", "B"], (A, B)->
Alternatively, maybe we could use proxies?
Make.someNS"A", A
Take.someNS ["A", "B"], (A, B)->
Another consideration is that we might need some way to generate a namespace dynamically, possibly at compile time. For instance, if we used the same namespace in all SVGAs, then we wouldn't be able to load 2 SVGAs into the same JS context without collisions. By compiling each SVGA with a unique auto-generated namespace, we could guarantee that there would be no collisions. We'd probably want to make this opt in on a per Make/Take basis, rather than rewriting plain Take and Make calls so that they had a dynamic NS applied to them. The reason to make it opt-in is so that code inside a dynamic NS could still Take things from a global (plain) NS, for instance if there's a standard library that's loaded into the page once and then shared by all other things loaded onto the same page.
The text was updated successfully, but these errors were encountered:
We need some way to add support for namespaces, so that two separate scripts in the same JS context can each use Take and Make without collision.
Perhaps the syntax could be:
Alternatively, maybe we could use proxies?
Another consideration is that we might need some way to generate a namespace dynamically, possibly at compile time. For instance, if we used the same namespace in all SVGAs, then we wouldn't be able to load 2 SVGAs into the same JS context without collisions. By compiling each SVGA with a unique auto-generated namespace, we could guarantee that there would be no collisions. We'd probably want to make this opt in on a per Make/Take basis, rather than rewriting plain Take and Make calls so that they had a dynamic NS applied to them. The reason to make it opt-in is so that code inside a dynamic NS could still Take things from a global (plain) NS, for instance if there's a standard library that's loaded into the page once and then shared by all other things loaded onto the same page.
The text was updated successfully, but these errors were encountered: