I think a great “plugin” to facilitate this would be something like:
function foo(bar, baz)
# do cool stuff w/ bar and baz, but I'm worried about type-instabilities
end
@example foo(1, "hey there sailor")
In this example, the @example
macro would expand to the actual function call if Atom was evaluating, and nothing
otherwise. That way it could be idiomatic to include these and Atom could automatically do @code_warntype
based on the example provided. This probably has the limitation of only allowing a single @example foo...
per function, but it still seems like a nice way to easily set things up.