Is there a syntactic sugar for a function where the arguments must all have a type T<:SomeType, but each one could be a different type?
What I want to do might be clearer by example. So at the moment I might write a function like the following:
function afunk(arg1::T1, arg2::T2, arg3::T3) where T1<:Real where T2<:Real where T3<:Real ... end
But I was wondering if there is a way to group those, something like:
function afunk(arg1::T1, arg2::T2, arg3::T3) where T1,T2,T3<:Real ... end
(The latter syntax doesn’t work, just trying to demonstrate approximately what I’m after in case it is not clear.)
It might not seem that useful from the above example, but for my preference, it might stop me using a type alias like suggested in the following discussion as it would keep my function signatures neat and readable: