Hacker News new | past | comments | ask | show | jobs | submit login

You could do something like this:

  plus_one(x::Number) = x + 1
  function plus_one(x)
    @warn "untested type usage of plus_one"
    x + 1
  end
That's cumbersome, but a macro could make it less annoying.



That is not a full solution to the problem of detecting untested types. What if "plus_one" works for Int, Float32, etc. but not with MyNumber, all of which would dispatch to "plus_one(::Number)".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: