{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/loader/issues/34","labels_url":"https://api.github.com/repos/whatwg/loader/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/loader/issues/34/comments","events_url":"https://api.github.com/repos/whatwg/loader/issues/34/events","html_url":"https://github.com/whatwg/loader/issues/34","id":60736523,"number":34,"title":"names for Loader constructor and default loader","user":{"login":"dherman","id":307871,"avatar_url":"https://avatars.githubusercontent.com/u/307871?v=3","gravatar_id":"","url":"https://api.github.com/users/dherman","html_url":"https://github.com/dherman","followers_url":"https://api.github.com/users/dherman/followers","following_url":"https://api.github.com/users/dherman/following{/other_user}","gists_url":"https://api.github.com/users/dherman/gists{/gist_id}","starred_url":"https://api.github.com/users/dherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dherman/subscriptions","organizations_url":"https://api.github.com/users/dherman/orgs","repos_url":"https://api.github.com/users/dherman/repos","events_url":"https://api.github.com/users/dherman/events{/privacy}","received_events_url":"https://api.github.com/users/dherman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/whatwg/loader/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/whatwg/loader/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":40,"created_at":"2015-03-11T21:55:30Z","updated_at":"2015-08-04T19:01:52Z","closed_at":null,"body":"## Summary\r\n\r\nDecide on names for two things: the Loader constructor and the default loader instance.\r\n\r\n## Background\r\n\r\nOriginally we had global `System` and `Loader` but that was when we expected `System.get()` to be a common use case. Once we worked out dynamic relative import, the default loader became a much more low-level API: it's meant for frameworks and loader customization logic, not for everyday use cases. So IMO giving it an attractive global name like `System` is inappropriate. Also, it was kind of competing with `window`, `navigator`, and `process` as Yet Another representation of the top level application state.\r\n\r\nIMO `Reflect.Loader` is good for the constructor, but this still leaves open the question of where the default loader should live. Suggestions:\r\n\r\n- another name in `Reflect`:\r\n  - `Reflect.System`\r\n  - `Reflect.LOADER`\r\n- a static property or method of `Reflect.Loader`:\r\n  - `Reflect.Loader.DEFAULT`\r\n  - `Reflect.Loader.current`\r\n  - `Reflect.Loader.current()`\r\n- `Reflect.Loader` itself is both the constructor and the instance\r\n\r\nMy preference is a `Reflect.Loader.current` getter. ALLCAPS feels more appropriate for immutable constants like `Math.PI` rather than a mutable object, and a `current()` method feels like overkill for just accessing a singleton object. But I like the idea that it's conceptually associated with the `Loader` type but it's a static singleton instance.\r\n\r\n## Drawbacks\r\n\r\nSystemjs already has named itself after System. But it's still a pretty cool name for the project, and this just gives it a more fun historical etymology. :)\r\n"},"comment":{"url":"https://api.github.com/repos/whatwg/loader/issues/comments/127719411","html_url":"https://github.com/whatwg/loader/issues/34#issuecomment-127719411","issue_url":"https://api.github.com/repos/whatwg/loader/issues/34","id":127719411,"user":{"login":"matthewp","id":361671,"avatar_url":"https://avatars.githubusercontent.com/u/361671?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewp","html_url":"https://github.com/matthewp","followers_url":"https://api.github.com/users/matthewp/followers","following_url":"https://api.github.com/users/matthewp/following{/other_user}","gists_url":"https://api.github.com/users/matthewp/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewp/subscriptions","organizations_url":"https://api.github.com/users/matthewp/orgs","repos_url":"https://api.github.com/users/matthewp/repos","events_url":"https://api.github.com/users/matthewp/events{/privacy}","received_events_url":"https://api.github.com/users/matthewp/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T19:01:52Z","updated_at":"2015-08-04T19:01:52Z","body":"Exposing the registry in some way (no opinion as to how) is still probably needed to solve #17"}}