nessos / Eff

A library design for programming with effects and handlers in C#
MIT License
126 stars 13 forks source link

Future Development and Features Roadmap #1

Closed solvingj closed 6 years ago

solvingj commented 6 years ago

This looks really nice actually. I'm new to using Effects, but have studied it extensively in the past few months. Do you have plans to extend it further? I will be experimenting with this in a project soon, and if I'm going to extend it, I'd like to work on features that you've already thought of.

palladin commented 6 years ago

I don't have any plans for future development but I would love to see how Eff can be used in a practical setting.

solvingj commented 6 years ago

Based on the research, talks, and examples I've read, it seems very logical to at least couple this with Maybe and Result containers.

My last project was largely written using this other functional library: https://github.com/vkhorikov/CSharpFunctionalExtensions/

I will probably use it on this new project as well, and try to figure out if/how the two can be used together.

solvingj commented 6 years ago

For posterity, in Eric Torreborre's talk about using Eff monad in Scala, he provides library implementation of what is very likely to be the first few practical monads bulit on top of Eff: https://youtu.be/KGJLeHhsZBo?t=1606

Here are the effects included:

Monad description
EvalEffect an effect for delayed computations
OptionEffect an effect for optional computations, stopping when there’s no available value\
EitherEffect an effect for computations with failures, stopping when there is a failure
ValidateEffect an effect for computations with failures, allowing to collect failures
ErrorEffect a mix of Eval and Either, catching exceptions and returning them as failures
ReaderEffect an effect for depending on a configuration or an environment
WriterEffect an effect to log messages
StateEffect an effect to pass state around
ListEffect an effect for computations returning several values
ChooseEffect an effect for modeling non-determinism
MemoEffect an effect for memoizing values
FutureEffect an effect for asynchronous computations
SafeEffect an effect for guaranteeing resource safety

http://atnos-org.github.io/eff/org.atnos.site.OutOfTheBox.html

solvingj commented 6 years ago

Given the above, it's possible that there are the most opportunities for using this implementation of Eff along with the language-ext library.

https://github.com/louthy/language-ext

Assuming basic compatibility/compose-ability between your Eff type and the types in that library, I can see a very simple step forward in bringing both libraries together into a pilot project and trying to mimic the above Effect types. If we achieve relative success, and can prove substantial value and maturity, we may want to consider submitting this Eff monad, and the composed types back to the language-ext library for inclusion. However, I emphasize the need for maturity and proof of value, so in theory it should stay a separate library for a long time while it evolves.

palladin commented 6 years ago

I'm not familiar with language-ext but I agree that it needs maturity and proof of value.

solvingj commented 6 years ago

If you have time to look language-ext over, i would like to know your thoughts.

solvingj commented 6 years ago

My question has been answered. The library currently appears to be a complete implementation of Eff which is ready for general use.