{"action":"created","issue":{"url":"https://api.github.com/repos/morepath/morepath/issues/448","repository_url":"https://api.github.com/repos/morepath/morepath","labels_url":"https://api.github.com/repos/morepath/morepath/issues/448/labels{/name}","comments_url":"https://api.github.com/repos/morepath/morepath/issues/448/comments","events_url":"https://api.github.com/repos/morepath/morepath/issues/448/events","html_url":"https://github.com/morepath/morepath/issues/448","id":156943648,"number":448,"title":"should generic functions be static methods of the app class?","user":{"login":"faassen","id":327472,"avatar_url":"https://avatars.githubusercontent.com/u/327472?v=3","gravatar_id":"","url":"https://api.github.com/users/faassen","html_url":"https://github.com/faassen","followers_url":"https://api.github.com/users/faassen/followers","following_url":"https://api.github.com/users/faassen/following{/other_user}","gists_url":"https://api.github.com/users/faassen/gists{/gist_id}","starred_url":"https://api.github.com/users/faassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faassen/subscriptions","organizations_url":"https://api.github.com/users/faassen/orgs","repos_url":"https://api.github.com/users/faassen/repos","events_url":"https://api.github.com/users/faassen/events{/privacy}","received_events_url":"https://api.github.com/users/faassen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/morepath/morepath/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/morepath/morepath/labels/idea","name":"idea","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2016-05-26T09:38:52Z","updated_at":"2016-07-26T21:50:08Z","closed_at":null,"body":"This is a big rather philosophical issues. Are generic functions in Morepath really actually special static methods on the app class? This because the implicit parameter for a generic function is always the app's lookup anyway. If we installed generic functions as static methods on the app class this implicitness would go away.\r\n\r\nTo make this smooth we probably would need to adjust Reg to have an awareness of an actual app class.\r\n\r\n@taschini what do you think?"},"comment":{"url":"https://api.github.com/repos/morepath/morepath/issues/comments/235416667","html_url":"https://github.com/morepath/morepath/issues/448#issuecomment-235416667","issue_url":"https://api.github.com/repos/morepath/morepath/issues/448","id":235416667,"user":{"login":"taschini","id":7879276,"avatar_url":"https://avatars.githubusercontent.com/u/7879276?v=3","gravatar_id":"","url":"https://api.github.com/users/taschini","html_url":"https://github.com/taschini","followers_url":"https://api.github.com/users/taschini/followers","following_url":"https://api.github.com/users/taschini/following{/other_user}","gists_url":"https://api.github.com/users/taschini/gists{/gist_id}","starred_url":"https://api.github.com/users/taschini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taschini/subscriptions","organizations_url":"https://api.github.com/users/taschini/orgs","repos_url":"https://api.github.com/users/taschini/repos","events_url":"https://api.github.com/users/taschini/events{/privacy}","received_events_url":"https://api.github.com/users/taschini/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T21:50:08Z","updated_at":"2016-07-26T21:50:08Z","body":"I have to say I'm still struggling with the idea that Reg attempts to do two things at once: 1) multiple dispatch, and 2) pluggability.\r\n\r\nSo I'd like to go back to our old friends ``generic.identify``, ``generic.load_json``, and ``generic.link_prefix``, the three \"generic\" functions that do not actually dispatch on their arguments. For these three Reg is obviously not needed for multiple dispatch, but is it needed for their pluggability? Not really (see #476): You don't need a ``RegRegistry`` for them, a plain object to store them is enough.\r\n\r\nIn fact, even at this stage I'd like to merge #476: beside simplifying the codebase, I think it will also help clarify the actual requirements for Reg.\r\n\r\nOn a side note, these three functions receive a request object as argument, so they are not affected by anything like #472. "}}
{"actor":{"display_login":"taschini"}}