{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/672","labels_url":"https://api.github.com/repos/facebook/flow/issues/672/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/672/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/672/events","html_url":"https://github.com/facebook/flow/pull/672","id":98067175,"number":672,"title":"Stupid simple interfaces","user":{"login":"popham","id":1271170,"avatar_url":"https://avatars.githubusercontent.com/u/1271170?v=3","gravatar_id":"","url":"https://api.github.com/users/popham","html_url":"https://github.com/popham","followers_url":"https://api.github.com/users/popham/followers","following_url":"https://api.github.com/users/popham/following{/other_user}","gists_url":"https://api.github.com/users/popham/gists{/gist_id}","starred_url":"https://api.github.com/users/popham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popham/subscriptions","organizations_url":"https://api.github.com/users/popham/orgs","repos_url":"https://api.github.com/users/popham/repos","events_url":"https://api.github.com/users/popham/events{/privacy}","received_events_url":"https://api.github.com/users/popham/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-30T01:46:42Z","updated_at":"2015-07-31T21:24:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/flow/pulls/672","html_url":"https://github.com/facebook/flow/pull/672","diff_url":"https://github.com/facebook/flow/pull/672.diff","patch_url":"https://github.com/facebook/flow/pull/672.patch"},"body":"This is a stub demonstrating an extension of Flow's object type notation to class types.  Basically object types, but with statics allowed, e.g.\r\n\r\n```\r\ntype BI = class {\r\n  bMethod1(): number;\r\n  static bsMethod1(): number;\r\n};\r\n```\r\n\r\nThese are cute in that intersection provides extension semantics.\r\n\r\nIs this worth the time to polish, or will a completed implementation get rejected in favor of some other syntax and/or semantics?"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/126815430","html_url":"https://github.com/facebook/flow/pull/672#issuecomment-126815430","issue_url":"https://api.github.com/repos/facebook/flow/issues/672","id":126815430,"user":{"login":"popham","id":1271170,"avatar_url":"https://avatars.githubusercontent.com/u/1271170?v=3","gravatar_id":"","url":"https://api.github.com/users/popham","html_url":"https://github.com/popham","followers_url":"https://api.github.com/users/popham/followers","following_url":"https://api.github.com/users/popham/following{/other_user}","gists_url":"https://api.github.com/users/popham/gists{/gist_id}","starred_url":"https://api.github.com/users/popham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popham/subscriptions","organizations_url":"https://api.github.com/users/popham/orgs","repos_url":"https://api.github.com/users/popham/repos","events_url":"https://api.github.com/users/popham/events{/privacy}","received_events_url":"https://api.github.com/users/popham/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T21:24:23Z","updated_at":"2015-07-31T21:24:23Z","body":"@avikchaudhuri Yeah, I remember from https://github.com/facebook/flow/issues/478#issuecomment-113314880.  That's why I asked if a completed implementation would be rejected.  I assume by your response that yes, a completed implementation will be rejected.\r\n\r\nIs the advantage of \"proper\" interfaces over \"stupid simple\" ones in error message sanity?  I've fallen in love with this syntax and the idea of intersections yielding interface refinements.  I feel it fits very naturally into the syntax of Flow, and I'm a little weary of using the `interface` word throughout my code.\r\n\r\nThe only challenge I expected was rebinding type parameters across an intersection, e.g. `type A<T> = B<T> & class C {...}`.  Is there any chance of someday desugaring this syntax (I imagine with `type A<T> = B<T> & interface C {...}`, `type A<T> = B & C<T>`, etc.)?  It seems like the natural analogue to class expressions versus class declarations."}}