{"action":"created","issue":{"url":"https://api.github.com/repos/dedis/cothority/issues/561","repository_url":"https://api.github.com/repos/dedis/cothority","labels_url":"https://api.github.com/repos/dedis/cothority/issues/561/labels{/name}","comments_url":"https://api.github.com/repos/dedis/cothority/issues/561/comments","events_url":"https://api.github.com/repos/dedis/cothority/issues/561/events","html_url":"https://github.com/dedis/cothority/issues/561","id":174030810,"number":561,"title":"Too extensive use of reflection","user":{"login":"Liamsi","id":7441766,"avatar_url":"https://avatars.githubusercontent.com/u/7441766?v=3","gravatar_id":"","url":"https://api.github.com/users/Liamsi","html_url":"https://github.com/Liamsi","followers_url":"https://api.github.com/users/Liamsi/followers","following_url":"https://api.github.com/users/Liamsi/following{/other_user}","gists_url":"https://api.github.com/users/Liamsi/gists{/gist_id}","starred_url":"https://api.github.com/users/Liamsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liamsi/subscriptions","organizations_url":"https://api.github.com/users/Liamsi/orgs","repos_url":"https://api.github.com/users/Liamsi/repos","events_url":"https://api.github.com/users/Liamsi/events{/privacy}","received_events_url":"https://api.github.com/users/Liamsi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dedis/cothority/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-08-30T14:14:51Z","updated_at":"2016-09-01T12:11:19Z","closed_at":null,"body":"Writing the timestamp server I re-discovered that we make extensive use of reflection. Not that I think that reflection is bad thing in general but it's still slower than alternatives and potential misuse (bugs) occur only during runtime instead of compile time. Hence, we should investigate if we could use less reflection. This isn't urgent at all (maybe even after `v1`) and would make our code a little faster and easier to use. One (non-critical) example of potential reflection overuse is `RegisterMessage` ([here](https://github.com/dedis/cothority/blob/b70b73dddb45abedd964629d6ed568523ecbcc2f/sda/processor.go#L142-L177)). If we expect a function of certain form as a parameter we should state that instead of `interface{}` and using reflection to make sure we actually got a function with certain amount of specific parameters and specific return types.\r\n\r\nIf you all agree it's worthwhile, I will write more specific what I mean (with some more examples) etc."},"comment":{"url":"https://api.github.com/repos/dedis/cothority/issues/comments/244059849","html_url":"https://github.com/dedis/cothority/issues/561#issuecomment-244059849","issue_url":"https://api.github.com/repos/dedis/cothority/issues/561","id":244059849,"user":{"login":"Liamsi","id":7441766,"avatar_url":"https://avatars.githubusercontent.com/u/7441766?v=3","gravatar_id":"","url":"https://api.github.com/users/Liamsi","html_url":"https://github.com/Liamsi","followers_url":"https://api.github.com/users/Liamsi/followers","following_url":"https://api.github.com/users/Liamsi/following{/other_user}","gists_url":"https://api.github.com/users/Liamsi/gists{/gist_id}","starred_url":"https://api.github.com/users/Liamsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liamsi/subscriptions","organizations_url":"https://api.github.com/users/Liamsi/orgs","repos_url":"https://api.github.com/users/Liamsi/repos","events_url":"https://api.github.com/users/Liamsi/events{/privacy}","received_events_url":"https://api.github.com/users/Liamsi/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T12:11:19Z","updated_at":"2016-09-01T12:11:19Z","body":"> Also, lest I seem to be siding too much with Ismail, I don't really agree that \"just switch to Rust\" is a solution here. :) \r\n\r\nMoving to Rust right now was more of a joke than anything else.  We are much faster in golang and it has everything we need. But if we want to stay with all this reflection and checking types and structure during runtime, we would better move to ruby or something that has some kind of \"Duck-typing\" (also not serious) ;-)"}}
{"actor":{"display_login":"Liamsi"}}