Since the new where syntax has depreciated the parametric method syntax that means it can be used for something else. I propose the following
foo{T::Number}(x::T,y::T} = ...
as syntactic sugar for
let T=Number
foo(x::T,y::T) = ...
end
This syntax can be very helpful when you have many variables with the same abstract type (especially if the abstract type has a long name).
Note that this is different than the familiar the foo(x::T,y::T) where T <: Number syntax
This lets Tbe a certain type and not just a subtype of one. For instance in the proposed syntax foo(1, 1.0) would work.
Edit:
Alternatively, a syntax that tells what a type is that wouldn’t use the parametric method syntax could be
I have to say I’m not a big fan. I think that parametric types and methods are confusing enough without another subtly-different way to use similar syntax. The where changes helped a lot with matching up the way methods are defined with the way they’re called, which I think was a big improvement, and this would feel like a step backwards in simplicity and clarity. I don’t think the convenience here is worth the confusion, I’d rather just see (x::Number, y::Number, z::Number) = ...
I just think that it would be a nice syntactic feature. Also I think that suggested f(x::T,y::T) where T::Number = ... is a natural extension to the where syntax.