Skip to content
This repository was archived by the owner on Aug 15, 2018. It is now read-only.

infer types from variable names #6

Open
mndrix opened this issue Mar 2, 2013 · 1 comment
Open

infer types from variable names #6

mndrix opened this issue Mar 2, 2013 · 1 comment

Comments

@mndrix
Copy link
Owner

mndrix commented Mar 2, 2013

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
Copy link
Owner Author

mndrix commented Mar 9, 2013

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant