Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reasonable naming scheme for functions #269

Open
andrejbauer opened this issue Mar 1, 2016 · 3 comments
Open

Reasonable naming scheme for functions #269

andrejbauer opened this issue Mar 1, 2016 · 3 comments

Comments

@andrejbauer
Copy link
Member

The various functions in Value have ad-hoc names, for unstance lookup_bound vs. get_bound and get_dynamic vs. get_dyn vs lookup_dynamic. It would be good to have a namign scheme that is less random.

@SkySkimmer
Copy link
Collaborator

The monadic bind and variable binding could get confusing as well.

@andrejbauer
Copy link
Member Author

Regarding the bindings, would it make sense to recode pattern matching so that it avoids exceptions and uses a monad? Would that help in reducing the variety of monads we use?

@SkySkimmer
Copy link
Collaborator

Matching uses the following which have monadic versions: (matching version | monadic version)

Value.get_bound | Value.lookup_bound
Value.get_dynamic_value | Value.lookup_dynamic_value
Value.push_bound | Value.add_bound
Value.get_signature | Value.lookup_signature
Value.get_constant | Value.lookup_constant
Value.get_env | N/A

In other words, if we convert matching to be in the monad the left side goes away.

Desugar used some redundant functions as well but not after #271.

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

No branches or pull requests

2 participants