Closed oscarnava closed 4 months ago
Influenced by the Funtional Programming's Discriminated Union, I chose enum because it is the closest to it. But I think you are recommending to use an interface. I will make the necessary changes. Thank you for the PR.
Can I close it now or do you think Interface is not the solution?
The Interface is much more adequate. 👍 Closing it.
Why did you choose to implement these classes as an
enum class
? Consider two things:How can you avoid these problems?
https://github.com/oezg/encryption-decryption-kt/blob/dc587a8b6fc924f831a849c0f8b8c0f9dfba51c5/Algorithm.kt#L3-L30