{"action":"created","issue":{"url":"https://api.github.com/repos/MatthewJA/Coffeequate/issues/78","labels_url":"https://api.github.com/repos/MatthewJA/Coffeequate/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/MatthewJA/Coffeequate/issues/78/comments","events_url":"https://api.github.com/repos/MatthewJA/Coffeequate/issues/78/events","html_url":"https://github.com/MatthewJA/Coffeequate/issues/78","id":37229995,"number":78,"title":"Lack of coordination between abstract classes and implementations","user":{"login":"bshlgrs","id":2689010,"avatar_url":"https://avatars.githubusercontent.com/u/2689010?v=3","gravatar_id":"","url":"https://api.github.com/users/bshlgrs","html_url":"https://github.com/bshlgrs","followers_url":"https://api.github.com/users/bshlgrs/followers","following_url":"https://api.github.com/users/bshlgrs/following{/other_user}","gists_url":"https://api.github.com/users/bshlgrs/gists{/gist_id}","starred_url":"https://api.github.com/users/bshlgrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bshlgrs/subscriptions","organizations_url":"https://api.github.com/users/bshlgrs/orgs","repos_url":"https://api.github.com/users/bshlgrs/repos","events_url":"https://api.github.com/users/bshlgrs/events{/privacy}","received_events_url":"https://api.github.com/users/bshlgrs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MatthewJA/Coffeequate/labels/meta","name":"meta","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-07-06T22:44:26Z","updated_at":"2015-06-19T11:48:13Z","closed_at":"2015-06-19T11:48:13Z","body":"Coffeequate currently mixes together two conflicting styles of OO design:\r\n\r\n- Write code which expects to act on the classes you defined. Eg, have wrappers around numeric values and so on. In this paradigm, you define abstract classes with default behaviours and don't check for the existence of functions before calling them.\r\n- Write code which mixes in other kinds of objects. Check for the existence of functions before calling them.\r\n\r\nWe should use the first style, but we have traces of the second style. For example, Pow.coffee lines 183 to 188 should be replaced by just `@children.left.simplify()`, because everything which we allow to be the child of a Pow node has that method defined: if it can't be simplified, it will just copy itself. Maybe that code was written back when we allowed primitive JS numbers to be in coffeequate expressions.\r\n\r\nWe should rewrite this kind of stuff where we see it, and not write more of it."},"comment":{"url":"https://api.github.com/repos/MatthewJA/Coffeequate/issues/comments/113487430","html_url":"https://github.com/MatthewJA/Coffeequate/issues/78#issuecomment-113487430","issue_url":"https://api.github.com/repos/MatthewJA/Coffeequate/issues/78","id":113487430,"user":{"login":"MatthewJA","id":2681312,"avatar_url":"https://avatars.githubusercontent.com/u/2681312?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewJA","html_url":"https://github.com/MatthewJA","followers_url":"https://api.github.com/users/MatthewJA/followers","following_url":"https://api.github.com/users/MatthewJA/following{/other_user}","gists_url":"https://api.github.com/users/MatthewJA/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewJA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewJA/subscriptions","organizations_url":"https://api.github.com/users/MatthewJA/orgs","repos_url":"https://api.github.com/users/MatthewJA/repos","events_url":"https://api.github.com/users/MatthewJA/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewJA/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T11:48:13Z","updated_at":"2015-06-19T11:48:13Z","body":"Resolved by #113 "}}