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

Create a clean implementation for NOT_A_VALUE #280

Closed
jvdb opened this issue Feb 5, 2019 · 1 comment
Closed

Create a clean implementation for NOT_A_VALUE #280

jvdb opened this issue Feb 5, 2019 · 1 comment
Assignees
Milestone

Comments

@jvdb
Copy link
Contributor

jvdb commented Feb 5, 2019

The work on #279 will lead to a rather simple approach to NOT_A_VALUE that is a little error-prone (basically, because it is possible for a user of the library to create a valid Value object that is the same as the NOT_A_VALUE-constant).

A clean approach will be to split Value into a Value interface and a ValueImpl (or BaseValue, CoreValue, ...) class. A NotAValue class can then be created with only a private constructor that is called when instantiating the constant. The ValueImpl's constructor(s) can then forbid constructing a zero-sized Value.

@jvdb jvdb self-assigned this Feb 5, 2019
@jvdb jvdb pinned this issue Feb 5, 2019
jvdb added a commit that referenced this issue Feb 7, 2019
jvdb added a commit that referenced this issue Feb 10, 2019
jvdb added a commit that referenced this issue Feb 16, 2019
jvdb added a commit that referenced this issue Feb 17, 2019
…tional-list

Change return value of ValueExpression.eval(...) to ImmutableList<Value> (#279), extract Value interface and create dedicated NotAValue class and instance (#280), implement SingleValueExpression to let the compiler help more when writing incorrect Metal tokens/expressions (#70).
@jvdb
Copy link
Contributor Author

jvdb commented Feb 17, 2019

#282 is merged, so issue closed (no autoclose it seems because it was merged through another branch/PR first...)

@jvdb jvdb closed this as completed Feb 17, 2019
@jvdb jvdb unpinned this issue Feb 17, 2019
@jvdb jvdb added this to the 8.0.0 milestone Feb 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant