(no title)
galimaufry | 4 years ago
... which actually seems like it might be doable with some macros? Those are beyond my ken right now, but the goal would be
@doubly_typed f(x::Number|Integer) = x
f(6.0) # Same as g(x::Number) = x; g(6.0)
@strictify f(6.0) # Same as g(x::Integer) = x; g(6.0)
Then you would use @strictify when running tests to ensure that the stricter types in your codebase are all compatible. But you'd still need to figure out what to do about return types and the help command...
No comments yet.