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

Parameters are not type-checked before being operated upon #11

Closed
Knetic opened this issue Mar 31, 2016 · 1 comment
Closed

Parameters are not type-checked before being operated upon #11

Knetic opened this issue Mar 31, 2016 · 1 comment
Assignees

Comments

@Knetic
Copy link
Owner

Knetic commented Mar 31, 2016

While there is good support for making sure that literals in an expression make sense lexically, there is no type safety or rules about which operators work on which values.

For instance, there is no intuitive or unambiguous behavior to checking if a string is ">=" another string, nor is there well-defined behavior for what negating a bool (-(1 > 2)) would do.

Currently if any operation isn't evaluable in golang itself, this library will panic. Panics are bad. Instead, an error should be returned in cases where operations against a type don't make sense.

@Knetic
Copy link
Owner Author

Knetic commented Apr 1, 2016

Implemented as of b7437d9 . Firmly tested by 88e68a1

@Knetic Knetic closed this as completed Apr 1, 2016
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

1 participant