infer types from variable names
Opened this issue · 1 comments
mndrix commented
A fair number of predicates have signatures like
%% atom_codes(?Atom, ?Codes).
The names unambiguously identify the argument types so the types are omitted. If an argument has no type declaration and the name corresponds to a common type, use that type as if it were declared.
mndrix commented
Jan says
there are lots of people who consider this really scary
So it should probably be implemented as a hook in the importing module. The hook relates a variable name to a type name. People opt into this behavior by declaring the hook.