{"action":"created","issue":{"url":"https://api.github.com/repos/rakudo/rakudo/issues/1949","repository_url":"https://api.github.com/repos/rakudo/rakudo","labels_url":"https://api.github.com/repos/rakudo/rakudo/issues/1949/labels{/name}","comments_url":"https://api.github.com/repos/rakudo/rakudo/issues/1949/comments","events_url":"https://api.github.com/repos/rakudo/rakudo/issues/1949/events","html_url":"https://github.com/rakudo/rakudo/issues/1949","id":334922373,"node_id":"MDU6SXNzdWUzMzQ5MjIzNzM=","number":1949,"title":"array is a type","user":{"login":"Juerd","id":791835,"node_id":"MDQ6VXNlcjc5MTgzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/791835?v=4","gravatar_id":"","url":"https://api.github.com/users/Juerd","html_url":"https://github.com/Juerd","followers_url":"https://api.github.com/users/Juerd/followers","following_url":"https://api.github.com/users/Juerd/following{/other_user}","gists_url":"https://api.github.com/users/Juerd/gists{/gist_id}","starred_url":"https://api.github.com/users/Juerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Juerd/subscriptions","organizations_url":"https://api.github.com/users/Juerd/orgs","repos_url":"https://api.github.com/users/Juerd/repos","events_url":"https://api.github.com/users/Juerd/events{/privacy}","received_events_url":"https://api.github.com/users/Juerd/received_events","type":"User","site_admin":false},"labels":[{"id":741210908,"node_id":"MDU6TGFiZWw3NDEyMTA5MDg=","url":"https://api.github.com/repos/rakudo/rakudo/labels/RFC","name":"RFC","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-22T15:30:15Z","updated_at":"2018-06-22T23:19:12Z","closed_at":null,"author_association":"NONE","body":"## The Problem\r\n\r\narray is a type\r\n\r\n## Expected Behavior\r\n\r\n`array` constructs an array, just like `hash` constructs a hash and `list` constructs a list.\r\n\r\n```\r\n.say for hash, list, array;  # expected: {}  ()  []\r\n```\r\n\r\n## Actual Behavior\r\n\r\n```\r\n.say for hash, list array;  # actual: {}  ()  (array)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/rakudo/rakudo/issues/comments/399608033","html_url":"https://github.com/rakudo/rakudo/issues/1949#issuecomment-399608033","issue_url":"https://api.github.com/repos/rakudo/rakudo/issues/1949","id":399608033,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTYwODAzMw==","user":{"login":"jnthn","id":50259,"node_id":"MDQ6VXNlcjUwMjU5","avatar_url":"https://avatars2.githubusercontent.com/u/50259?v=4","gravatar_id":"","url":"https://api.github.com/users/jnthn","html_url":"https://github.com/jnthn","followers_url":"https://api.github.com/users/jnthn/followers","following_url":"https://api.github.com/users/jnthn/following{/other_user}","gists_url":"https://api.github.com/users/jnthn/gists{/gist_id}","starred_url":"https://api.github.com/users/jnthn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnthn/subscriptions","organizations_url":"https://api.github.com/users/jnthn/orgs","repos_url":"https://api.github.com/users/jnthn/repos","events_url":"https://api.github.com/users/jnthn/events{/privacy}","received_events_url":"https://api.github.com/users/jnthn/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T23:19:12Z","updated_at":"2018-06-22T23:19:12Z","author_association":"MEMBER","body":"What @pmichaud said: `hash` and `list` are contextualizers. That's why `.list` on an `Array` and `.hash` on a `Map` are both identity. It's also why there's a `set` sub (also seen as a contextualizer), but not a sethash sub.\r\n\r\nMany types come in a mutable and shallow-immutable form (`List`/`Array`, `Map`/`Hash`, `Set`/`SetHash`), and in all of these cases there's a single conextualizer. If there's an odd one out, it's `hash`, which is named after - and by default produces - the mutable thing. For obvious reasons, we couldn't use `map` for that. It does, however, produce by default the type you'd think that it would from the name (a `Hash`), if it isn't in an identity situation.\r\n\r\nThere's also a consistent pattern of the boxed/object form of a type, say `Int`, having its native form in lowercase (`int`). The `Array`/`array` is also a case of this.\r\n\r\nThus asking for `array` to be a `sub` that creates an array is asking for two other consistent patterns to be broken. This doesn't strike me as a win."}}
{"actor":{"display_login":"jnthn"}}