I recently had some murky thoughts on my ideal Matlab replacement, and it would have a feature like this. It would be huge for array-oriented programming: func train_model(X: [n d], y: [n 1]) So many lines of code are spent verifying that the sizes of two function arguments are compatible.
Other example: Fixed size matrix multiplication in https://github.com/SimonDanisch/FixedSizeArrays.jl depends on element type T and dimensions MxN and NxR:
function *{T, M, N, R}(a::Mat{M, N, T}, b::Mat{N, R, T})