Instead of
function f(t::Tuple{Bool,Int})
a = t[1]
b = t[2]
end
it would be nice to say:
function f((a,b)::Tuple{Bool,Int})
end
or even better:
function f((a::Bool, b::Int))
end
Instead of
function f(t::Tuple{Bool,Int})
a = t[1]
b = t[2]
end
it would be nice to say:
function f((a,b)::Tuple{Bool,Int})
end
or even better:
function f((a::Bool, b::Int))
end
Looks like you want ML-style pattern matching. Not sure whether most people are interested in this, but Iād support a PR that implements it.
It does seem useful from time to time. I wonder why python3 gets rid of it.
I think this would be useful.
Definitely useful, mostly a matter of someone implementing it.