Closed Octogonapus closed 5 years ago
LGTM, @AdrianRaFo can merge :D
I think we should create a companion object on Foo
enum class Foo{
A;
companion object
}
to get something like Foo.encoder()
Besides, I would add a section on the coding
section in the documentation explaining how to use this
@AdrianRaFo I wanted to have an API like Foo.encoder()
but I couldn't figure out the correct method signature to make it happen.
This does not work: fun <E : Enum<E>> Enum.Companion.encoder()
This does not compile: fun <E : Enum<E>> Enum<E>.Companion.encoder()
This does not compile: fun <E : Enum<E>> E.Companion.encoder()
Do you know how to write that part?
I'll take a look
Besides, please remember to assign yourself the issue or left a comment if you are going to take it :wink:
@Octogonapus Let me know you thought about this https://github.com/Octogonapus/helios/pull/1
@AdrianRaFo I would have assigned the issue to myself, but I can't do that as an external collaborator. I thought my intention to work on the issue was clear from my comments.
You're right, just for future references ☺️
Not sure why the benchmark failed.
don't worry about them, they fail some times. I'll restart them
This PR adds an
Enum
encoder and decoder implementation. I wasn't sure where to put this, let me know if it should be moved.Closes #85.