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

Enhancement: convert cond to case in types.clj #18

Closed
oubiwann opened this issue Jul 8, 2016 · 4 comments
Closed

Enhancement: convert cond to case in types.clj #18

oubiwann opened this issue Jul 8, 2016 · 4 comments
Milestone

Comments

@oubiwann
Copy link
Member

oubiwann commented Jul 8, 2016

There's one cond left in mesomatic.types that is able to be converted to a case.

This makes the code more readable, and brings the data->pb function in line with the other functions in the namespace that are amenable to using case (the ones that aren't checking against Java fields).

The work for this was done in this branch:

@alexandergunnarson
Copy link
Contributor

alexandergunnarson commented Jul 21, 2016

I was able to transform quite a few more conds to cases than just the last one in mesomatic.types. If it's checking against any compile-type constant (keywords included, not just numbers or Java enums), then case is valid and wins over cond in terms of performance and readability. You can take a look at the PR here.

@oubiwann
Copy link
Member Author

@alexandergunnarson Nice! I was on vacation, so didn't see this until just now. I've merged your changes into the branch I worked on (#1), and I've also merged these changes into the "deploy" branch we're using at USGS (https://github.com/clojusc/mesomatic/tree/deploy).

Thanks!

@alexandergunnarson
Copy link
Contributor

@oubiwann No problem! Thanks for merging it.

@oubiwann
Copy link
Member Author

Closing this ticket since @alexandergunnarson's newer branch supersedes it.

@oubiwann oubiwann added this to the 1.0.1 milestone Dec 20, 2017
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

No branches or pull requests

2 participants