{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaGraphs/StaticGraphs.jl/issues/5","repository_url":"https://api.github.com/repos/JuliaGraphs/StaticGraphs.jl","labels_url":"https://api.github.com/repos/JuliaGraphs/StaticGraphs.jl/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/JuliaGraphs/StaticGraphs.jl/issues/5/comments","events_url":"https://api.github.com/repos/JuliaGraphs/StaticGraphs.jl/issues/5/events","html_url":"https://github.com/JuliaGraphs/StaticGraphs.jl/issues/5","id":294126465,"number":5,"title":"Type-unsafe constructors","user":{"login":"mbesancon","id":7623090,"avatar_url":"https://avatars2.githubusercontent.com/u/7623090?v=4","gravatar_id":"","url":"https://api.github.com/users/mbesancon","html_url":"https://github.com/mbesancon","followers_url":"https://api.github.com/users/mbesancon/followers","following_url":"https://api.github.com/users/mbesancon/following{/other_user}","gists_url":"https://api.github.com/users/mbesancon/gists{/gist_id}","starred_url":"https://api.github.com/users/mbesancon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbesancon/subscriptions","organizations_url":"https://api.github.com/users/mbesancon/orgs","repos_url":"https://api.github.com/users/mbesancon/repos","events_url":"https://api.github.com/users/mbesancon/events{/privacy}","received_events_url":"https://api.github.com/users/mbesancon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-03T16:56:17Z","updated_at":"2018-02-04T00:06:37Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I'm not a fan of these constructors (same for StaticDigraph)\r\n```\r\nfunction StaticGraph(n_v, ss::AbstractVector, ds::AbstractVector)\r\n```\r\n\r\nThey don't specify an element type for ss and ds, and then need to use `convert(Vector{T},ds)` with T as the smallest type to contain them:\r\n```\r\nfunction mintype(v::AbstractVector)\r\n    validtypes = [UInt8, UInt16, UInt32, UInt64, UInt128]\r\n    l = v[end]\r\n    for T in validtypes\r\n        l <= typemax(T) && return T\r\n    end\r\n    return eltype(v)\r\nend\r\n```\r\nShouldn't the input vectors directly specify a type?"},"comment":{"url":"https://api.github.com/repos/JuliaGraphs/StaticGraphs.jl/issues/comments/362867854","html_url":"https://github.com/JuliaGraphs/StaticGraphs.jl/issues/5#issuecomment-362867854","issue_url":"https://api.github.com/repos/JuliaGraphs/StaticGraphs.jl/issues/5","id":362867854,"user":{"login":"sbromberger","id":941359,"avatar_url":"https://avatars0.githubusercontent.com/u/941359?v=4","gravatar_id":"","url":"https://api.github.com/users/sbromberger","html_url":"https://github.com/sbromberger","followers_url":"https://api.github.com/users/sbromberger/followers","following_url":"https://api.github.com/users/sbromberger/following{/other_user}","gists_url":"https://api.github.com/users/sbromberger/gists{/gist_id}","starred_url":"https://api.github.com/users/sbromberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbromberger/subscriptions","organizations_url":"https://api.github.com/users/sbromberger/orgs","repos_url":"https://api.github.com/users/sbromberger/repos","events_url":"https://api.github.com/users/sbromberger/events{/privacy}","received_events_url":"https://api.github.com/users/sbromberger/received_events","type":"User","site_admin":false},"created_at":"2018-02-04T00:06:37Z","updated_at":"2018-02-04T00:06:37Z","author_association":"OWNER","body":"Oh, I guess we could type parameterize them: `ss::AbstractVector{T}, ds::AbstractVector{U} ... where T <: Integer where U <: Integer`?"}}
{"actor":{"display_login":"sbromberger"}}