Skip to content

Conversation

@leogtzr
Copy link
Contributor

@leogtzr leogtzr commented May 31, 2017

No description provided.

@leogtzr
Copy link
Contributor Author

leogtzr commented Jun 1, 2017

This change (#110cccb) helps to decouple "Operator" with its "precedence", in my opinion, "Operator" and its precedence should be separate, it smells like it is breaking single responsability principle, "Operator" is abstract and it is meant to be extended ... being able to access its class variables doesn't look right to me.
I have added a class with a non-instantiable idiom that holds precedence values.

@leogtzr
Copy link
Contributor Author

leogtzr commented Jun 1, 2017

I have refactored the code in Function.java class with an enum, this would help to avoid the coupling between class variables and the array, now we have all the logic in the enum ... we also got rid of indexing.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant