{"action":"created","issue":{"url":"https://api.github.com/repos/stampit-org/stampit/issues/312","repository_url":"https://api.github.com/repos/stampit-org/stampit","labels_url":"https://api.github.com/repos/stampit-org/stampit/issues/312/labels{/name}","comments_url":"https://api.github.com/repos/stampit-org/stampit/issues/312/comments","events_url":"https://api.github.com/repos/stampit-org/stampit/issues/312/events","html_url":"https://github.com/stampit-org/stampit/issues/312","id":230416961,"number":312,"title":"Making instanceOf work for stamps","user":{"login":"far-blue","id":344317,"avatar_url":"https://avatars1.githubusercontent.com/u/344317?v=3","gravatar_id":"","url":"https://api.github.com/users/far-blue","html_url":"https://github.com/far-blue","followers_url":"https://api.github.com/users/far-blue/followers","following_url":"https://api.github.com/users/far-blue/following{/other_user}","gists_url":"https://api.github.com/users/far-blue/gists{/gist_id}","starred_url":"https://api.github.com/users/far-blue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/far-blue/subscriptions","organizations_url":"https://api.github.com/users/far-blue/orgs","repos_url":"https://api.github.com/users/far-blue/repos","events_url":"https://api.github.com/users/far-blue/events{/privacy}","received_events_url":"https://api.github.com/users/far-blue/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-05-22T14:37:25Z","updated_at":"2017-05-24T03:42:39Z","closed_at":"2017-05-23T07:59:24Z","body":"ES6 has Symbol.hasInstance which allows you to control the function run to determine if an object is an instance of another object. Usually, as we know, it simply checks the prototype chain. If stampit kept a track of the objects / propertyDescriptors  combined to create the objects returned from a stamp, those objects could have an overridden Symbol.hasInstance method that checks the list of combined objects / propertyDescriptors to determine instanceOf."},"comment":{"url":"https://api.github.com/repos/stampit-org/stampit/issues/comments/303609385","html_url":"https://github.com/stampit-org/stampit/issues/312#issuecomment-303609385","issue_url":"https://api.github.com/repos/stampit-org/stampit/issues/312","id":303609385,"user":{"login":"ericelliott","id":364727,"avatar_url":"https://avatars2.githubusercontent.com/u/364727?v=3","gravatar_id":"","url":"https://api.github.com/users/ericelliott","html_url":"https://github.com/ericelliott","followers_url":"https://api.github.com/users/ericelliott/followers","following_url":"https://api.github.com/users/ericelliott/following{/other_user}","gists_url":"https://api.github.com/users/ericelliott/gists{/gist_id}","starred_url":"https://api.github.com/users/ericelliott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericelliott/subscriptions","organizations_url":"https://api.github.com/users/ericelliott/orgs","repos_url":"https://api.github.com/users/ericelliott/repos","events_url":"https://api.github.com/users/ericelliott/events{/privacy}","received_events_url":"https://api.github.com/users/ericelliott/received_events","type":"User","site_admin":false},"created_at":"2017-05-24T03:42:39Z","updated_at":"2017-05-24T03:42:39Z","body":"> Because Eric Elliott changed his mind on the instanceof topic? :)\r\n\r\nLet's not get crazy. `instanceof`'s default behavior is deeply problematic, and I have not changed my mind about that.\r\n\r\nHowever, making `instanceof` work by looking up a string-based tag (NOT identity based) could work across execution contexts, could work even if a prototype changes (just declare that the new prototype satisfies some tag's contract), and basically has none of the problems with the original `instanceof` behavior.\r\n\r\nWhen circumstances change, we're allowed to adapt our stance. In fact, if you don't adapt your stance, you could get knocked over. ;)\r\n\r\nThat said, if it disables hidden class optimizations, that sucks. Which reminds me, engineering tradeoffs and stupidity are often indistinguishable if you're unaware of the tradeoffs. Turning off optimizations globally due to custom `instanceof` behavior in local objects strikes me as stupidity. Clearly I'm unaware of some tradeoffs in V8. ;)"}}
{"actor":{"display_login":"ericelliott"}}