{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/11769","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/11769/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/11769/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/11769/events","html_url":"https://github.com/JuliaLang/julia/issues/11769","id":89665135,"number":11769,"title":"Why is `length` defined on numbers?","user":{"login":"samuela","id":226872,"avatar_url":"https://avatars.githubusercontent.com/u/226872?v=3","gravatar_id":"","url":"https://api.github.com/users/samuela","html_url":"https://github.com/samuela","followers_url":"https://api.github.com/users/samuela/followers","following_url":"https://api.github.com/users/samuela/following{/other_user}","gists_url":"https://api.github.com/users/samuela/gists{/gist_id}","starred_url":"https://api.github.com/users/samuela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuela/subscriptions","organizations_url":"https://api.github.com/users/samuela/orgs","repos_url":"https://api.github.com/users/samuela/repos","events_url":"https://api.github.com/users/samuela/events{/privacy}","received_events_url":"https://api.github.com/users/samuela/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-06-19T21:30:24Z","updated_at":"2015-06-19T21:49:39Z","closed_at":"2015-06-19T21:37:04Z","body":"I discovered from a typo today that the `length` method is defined on numbers:\r\n```julia\r\njulia> length(5)\r\n1\r\n\r\njulia> length(pi)\r\n1\r\n```\r\nIt's defined here: https://github.com/JuliaLang/julia/blob/master/base/number.jl#L12. Why is `length` defined on numbers? This seems counterintuitive. Numbers aren't iterable in any way after all."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/113652932","html_url":"https://github.com/JuliaLang/julia/issues/11769#issuecomment-113652932","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/11769","id":113652932,"user":{"login":"JeffBezanson","id":744556,"avatar_url":"https://avatars.githubusercontent.com/u/744556?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffBezanson","html_url":"https://github.com/JeffBezanson","followers_url":"https://api.github.com/users/JeffBezanson/followers","following_url":"https://api.github.com/users/JeffBezanson/following{/other_user}","gists_url":"https://api.github.com/users/JeffBezanson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffBezanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffBezanson/subscriptions","organizations_url":"https://api.github.com/users/JeffBezanson/orgs","repos_url":"https://api.github.com/users/JeffBezanson/repos","events_url":"https://api.github.com/users/JeffBezanson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffBezanson/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T21:49:39Z","updated_at":"2015-06-19T21:49:39Z","body":"Yes I really think we should experiment with removing iteration of numbers. I think the array indexing redesign might make this possible."}}