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

Refactor variable #4

Open
StrykerKKD opened this issue Nov 30, 2019 · 1 comment
Open

Refactor variable #4

StrykerKKD opened this issue Nov 30, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@StrykerKKD
Copy link
Owner

StrykerKKD commented Nov 30, 2019

Variable should be more easily assignable, because right now is a little bit cumbersome. Also the variable needs to be more expressive, so it should be a record instead of a simple string.

Variable's module should have constructor for every kind variable type.

Another issue is that you can only get the variable's value by calling State's value_of, which is not problem, but maybe it should live in Variable's module.

Variable module would have:

  • type specific constructors which would give back a goal, so it would be just an abstraction over Goal.equal
  • value_of function which has a variable_name and a state input and returns the value of the variable and this return value can either be a success or a failure(option and an exception version)
@StrykerKKD StrykerKKD added the enhancement New feature or request label Nov 30, 2019
@StrykerKKD StrykerKKD changed the title Refactore variable Refactor variable Nov 30, 2019
@StrykerKKD
Copy link
Owner Author

StrykerKKD commented Dec 1, 2019

Adding namespace to a variable also could be included in this issue. Adding namespace would make sense, because:

  • It could make the variable more unique
  • Namespace could be used easily to map to a configuration's field

I'm not sure about adding namespaces, because it add an unnecessary overhead when the namespace could be part of the variable's name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant