Skip to content

Refactor variable #4

@StrykerKKD

Description

@StrykerKKD

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions