colomboe / KIO

A simple, lightweight IO monad implementation for Kotlin with effect rotation
https://colomboe.github.io/KIO/
Apache License 2.0
60 stars 4 forks source link

Stack Safety #3

Closed raulraja closed 4 years ago

raulraja commented 4 years ago

I could not find in the sources anything related to stack Safety or laws that govern this data type. I recommend that even if you don't use the type classes you provide extensions and law checks on your test for the Concurrent laws in arrow. This would allow us in arrow to add a KIO module so arrow users can use your implementation if they want with Monad binding and other arrow features you don't seem to be targeting here.

colomboe commented 4 years ago

The implementation of KIO is stack safe, but as you suggest I should add some more tests in order to guarantee it and maybe some tests about the law checks as you are pointing out.

About the integration with Arrow and the ability to use KIO with it, it is currently out of scope for this library, at least for now. If a developer wants/need all the goodies provided by Arrow, he should just stick with Arrow, as it provides a huge feature set, better performances (I suppose) and, for sure, it is developed by people much more skilled than me.

I'll keep this issue open at least for the addition of tests about stack safety and laws.

colomboe commented 4 years ago

Added stack safety tests. About Concurrent laws, I'm not going to add them right now since the concurrency support is right now very limited.