{"action":"opened","issue":{"url":"https://api.github.com/repos/justinlatimer/node-midi/issues/87","labels_url":"https://api.github.com/repos/justinlatimer/node-midi/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/justinlatimer/node-midi/issues/87/comments","events_url":"https://api.github.com/repos/justinlatimer/node-midi/issues/87/events","html_url":"https://github.com/justinlatimer/node-midi/issues/87","id":112257884,"number":87,"title":"Constructor functions should start with a capital letter.","user":{"login":"KenPowers","id":174864,"avatar_url":"https://avatars.githubusercontent.com/u/174864?v=3","gravatar_id":"","url":"https://api.github.com/users/KenPowers","html_url":"https://github.com/KenPowers","followers_url":"https://api.github.com/users/KenPowers/followers","following_url":"https://api.github.com/users/KenPowers/following{/other_user}","gists_url":"https://api.github.com/users/KenPowers/gists{/gist_id}","starred_url":"https://api.github.com/users/KenPowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KenPowers/subscriptions","organizations_url":"https://api.github.com/users/KenPowers/orgs","repos_url":"https://api.github.com/users/KenPowers/repos","events_url":"https://api.github.com/users/KenPowers/events{/privacy}","received_events_url":"https://api.github.com/users/KenPowers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-20T00:11:27Z","updated_at":"2015-10-20T00:11:27Z","closed_at":null,"body":"As per JavaScript conventions, constructor functions should start with a capital letter to distinguish them from normal functions. I was going to submit a pull request which would change the logic to the following:\r\n\r\n```js\r\nfunction input() {\r\n  if (!(this instanceof input)) {\r\n    return new input(...arguments);\r\n  }\r\n  // rest of constructor logic\r\n}\r\n```\r\n\r\nThis allows constructor calls of `input()` as well as `new input()`, preserving backwards compatibility. I'm not sure how to do this in C++ though. Thoughts?"}}