Closed JoeHowarth closed 2 years ago
Oh yea this should definitely be static. Must have slipped my mind when I was implementing. Good suggestion!
I was probably thinking something along the lines of:
if (myEnumValue instanceOf MyEnum.Swap) {
...
} else if (myEnumValue instanceOf MyEnum.LP) {
...
}
but switch is way more elegant.
Nice, thanks! Left a little comment on #38
I'd like to branch on variant kind like below, but kind is an instance variable, not static, so the following doesn't work
Proposal
If there's another more idiomatic way of doing this please let me know instead