{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/18367","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/18367/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/18367/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/18367/events","html_url":"https://github.com/JuliaLang/julia/issues/18367","id":175135948,"number":18367,"title":"Introduce `UInt1` type to replace misuse of `Bool`","user":{"login":"TotalVerb","id":12903942,"avatar_url":"https://avatars.githubusercontent.com/u/12903942?v=3","gravatar_id":"","url":"https://api.github.com/users/TotalVerb","html_url":"https://github.com/TotalVerb","followers_url":"https://api.github.com/users/TotalVerb/followers","following_url":"https://api.github.com/users/TotalVerb/following{/other_user}","gists_url":"https://api.github.com/users/TotalVerb/gists{/gist_id}","starred_url":"https://api.github.com/users/TotalVerb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TotalVerb/subscriptions","organizations_url":"https://api.github.com/users/TotalVerb/orgs","repos_url":"https://api.github.com/users/TotalVerb/repos","events_url":"https://api.github.com/users/TotalVerb/events{/privacy}","received_events_url":"https://api.github.com/users/TotalVerb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":43,"created_at":"2016-09-05T23:21:44Z","updated_at":"2016-09-07T01:35:59Z","closed_at":null,"body":"This will solve a whole bunch of problems.\r\n\r\n- `UInt1` is a lot more intuitive than `Bool` as a identity element for `promote_type`.\r\n- `true + true === 2` won't be inconsistent with every other unsigned type; we can have `UInt1(1) + UInt1(1) === UInt1(0)` as expected.\r\n- `Bool` can be made non-numeric. (cc @StefanKarpinski)\r\n\r\nI think the current system is really not ideal; it's worse than a method pun: it's punning a type for two very different things."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/245149164","html_url":"https://github.com/JuliaLang/julia/issues/18367#issuecomment-245149164","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/18367","id":245149164,"user":{"login":"andyferris","id":2974526,"avatar_url":"https://avatars.githubusercontent.com/u/2974526?v=3","gravatar_id":"","url":"https://api.github.com/users/andyferris","html_url":"https://github.com/andyferris","followers_url":"https://api.github.com/users/andyferris/followers","following_url":"https://api.github.com/users/andyferris/following{/other_user}","gists_url":"https://api.github.com/users/andyferris/gists{/gist_id}","starred_url":"https://api.github.com/users/andyferris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyferris/subscriptions","organizations_url":"https://api.github.com/users/andyferris/orgs","repos_url":"https://api.github.com/users/andyferris/repos","events_url":"https://api.github.com/users/andyferris/events{/privacy}","received_events_url":"https://api.github.com/users/andyferris/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T01:35:59Z","updated_at":"2016-09-07T01:35:59Z","body":"> My x86 assembly is rusty but I don't see a mulq there. I suspect the optimization you're looking for is already done.\r\n\r\nWow that is really long! It just has to reorder two numbers and apply minus to one of them. I've been staring at *StaticArrays* assembly a lot and 2-vector code is typically much, much shorter.\r\n\r\nI think that LLVM does a lot of the optimizations for multiplying by 1, etc, not inference/codegen.\r\n\r\n>  Consider the vector [1+0im, 1im, -1+0im, -1im]\r\n\r\nDoesn't this run through `promote_type` and thus become `Vector{Complex{Int}}`? But, yes I imagine there are other just as annoying corner cases here with a very similar problem."}}
{"actor":{"display_login":"andyferris"}}