{"action":"created","issue":{"url":"https://api.github.com/repos/phetsims/chipper/issues/415","labels_url":"https://api.github.com/repos/phetsims/chipper/issues/415/labels{/name}","comments_url":"https://api.github.com/repos/phetsims/chipper/issues/415/comments","events_url":"https://api.github.com/repos/phetsims/chipper/issues/415/events","html_url":"https://github.com/phetsims/chipper/issues/415","id":120918449,"number":415,"title":"Discuss style for number of parameters","user":{"login":"samreid","id":679486,"avatar_url":"https://avatars.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phetsims/chipper/labels/developer-meeting","name":"developer-meeting","color":"000000"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-08T02:50:13Z","updated_at":"2015-12-08T18:02:23Z","closed_at":null,"body":"In https://github.com/phetsims/bending-light/issues/315 @pixelzoom pointed out that the BendingLightView has too many required parameters (10 when the issue was created).  I asked the following follow-up questions:\r\n\r\n1. How many required constructor/function parameters is too many?  Is it context-sensitive?\r\n2. Should we formalize a rule for our style guide about limiting the number of parameters?\r\n3. Should we formalize a lint rule for limiting the number of parameters?\r\n\r\nIt looks like eslint already has a max-params rule: http://eslint.org/docs/rules/max-params.html\r\n\r\nMarking for developer meeting unless we can discuss/decide before then."},"comment":{"url":"https://api.github.com/repos/phetsims/chipper/issues/comments/162963642","html_url":"https://github.com/phetsims/chipper/issues/415#issuecomment-162963642","issue_url":"https://api.github.com/repos/phetsims/chipper/issues/415","id":162963642,"user":{"login":"pixelzoom","id":3046552,"avatar_url":"https://avatars.githubusercontent.com/u/3046552?v=3","gravatar_id":"","url":"https://api.github.com/users/pixelzoom","html_url":"https://github.com/pixelzoom","followers_url":"https://api.github.com/users/pixelzoom/followers","following_url":"https://api.github.com/users/pixelzoom/following{/other_user}","gists_url":"https://api.github.com/users/pixelzoom/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelzoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelzoom/subscriptions","organizations_url":"https://api.github.com/users/pixelzoom/orgs","repos_url":"https://api.github.com/users/pixelzoom/repos","events_url":"https://api.github.com/users/pixelzoom/events{/privacy}","received_events_url":"https://api.github.com/users/pixelzoom/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T18:02:23Z","updated_at":"2015-12-08T18:02:23Z","body":"I don't think that number of parameters should be a metric.  I think the recommendations should be:\r\n\r\n• use constructor parameters for things that have no sensible default value\r\n• use options for things that have a default value"}}