Closed jashkenas closed 6 years ago
I’m okay with renaming to Library and making it the default export. 👍
I’m wary of exporting the static namespaces. First, mixing default and named exports is a little awkward when transpiling back to ES5. More importantly, it locks us in to those symbols being static, rather than being able to configure them dynamically when the library is constructed. And it feels weird that these namespaces are available statically, but the rest of stdlib (require, md, etc.) is not.
Alright — changed to that the runtime has to go through a stdlib Library instance in order to access "observe" and "input".
Only a small change to the standard library:
Renames
runtimeLibrary
to just plainLibrary
, for consistency with notebook-runtime.Also exports the "static" namespaces from the standard library at the top level, so you can individually import DOM, Files, Generators or Promises if you choose to. (The notebook-runtime uses just Generators).