{"action":"created","issue":{"url":"https://api.github.com/repos/vjcitn/biocMultiAssay/issues/67","labels_url":"https://api.github.com/repos/vjcitn/biocMultiAssay/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/vjcitn/biocMultiAssay/issues/67/comments","events_url":"https://api.github.com/repos/vjcitn/biocMultiAssay/issues/67/events","html_url":"https://github.com/vjcitn/biocMultiAssay/issues/67","id":121795402,"number":67,"title":"Constructors should work without arguments, and return an object of the appropriate class","user":{"login":"mtmorgan","id":118552,"avatar_url":"https://avatars.githubusercontent.com/u/118552?v=3","gravatar_id":"","url":"https://api.github.com/users/mtmorgan","html_url":"https://github.com/mtmorgan","followers_url":"https://api.github.com/users/mtmorgan/followers","following_url":"https://api.github.com/users/mtmorgan/following{/other_user}","gists_url":"https://api.github.com/users/mtmorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/mtmorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtmorgan/subscriptions","organizations_url":"https://api.github.com/users/mtmorgan/orgs","repos_url":"https://api.github.com/users/mtmorgan/repos","events_url":"https://api.github.com/users/mtmorgan/events{/privacy}","received_events_url":"https://api.github.com/users/mtmorgan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-11T21:31:47Z","updated_at":"2015-12-15T18:01:20Z","closed_at":null,"body":"For instance, `RaggedRangedAssay()` should work but does not\r\n\r\n```\r\n> RaggedRangedAssay()\r\nError in RaggedRangedAssay() : argument \"x\" is missing, with no default\r\n```\r\n\r\nUsually (though not always), this _simplifies_ the implementation, even though the first thought is that the zero-length constructor will require some kind of conditional code / additional method implementation.\r\n\r\nA generic should as a general rule have a contract that the return value is consistent across methods. In particular a constructor should return an object of the corresponding class. This is not the case for `RaggedRangedAssay(list())`, which returns a simple list\r\n\r\n```\r\nis(RaggedRangedAssay(list()), 'RaggedRangedAssay')   # FALSE\r\n```"},"comment":{"url":"https://api.github.com/repos/vjcitn/biocMultiAssay/issues/comments/164842471","html_url":"https://github.com/vjcitn/biocMultiAssay/issues/67#issuecomment-164842471","issue_url":"https://api.github.com/repos/vjcitn/biocMultiAssay/issues/67","id":164842471,"user":{"login":"lwaldron","id":639942,"avatar_url":"https://avatars.githubusercontent.com/u/639942?v=3","gravatar_id":"","url":"https://api.github.com/users/lwaldron","html_url":"https://github.com/lwaldron","followers_url":"https://api.github.com/users/lwaldron/followers","following_url":"https://api.github.com/users/lwaldron/following{/other_user}","gists_url":"https://api.github.com/users/lwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/lwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwaldron/subscriptions","organizations_url":"https://api.github.com/users/lwaldron/orgs","repos_url":"https://api.github.com/users/lwaldron/repos","events_url":"https://api.github.com/users/lwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/lwaldron/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T18:01:20Z","updated_at":"2015-12-15T18:01:20Z","body":"This addresses the first issue that @mtmorgan raised, but not the second - that `RaggedRangedAssay()` should not return an object of any class other than RaggedRangedAssay. "}}