-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Questions about side effect and Elixir interop #297
Comments
That's precisely correct. Also the side effects is the hardest part of Elchemy to get right, hence I'm against any rushed solutions. So to sum it up:
Why ffi only for pure computations?There is many gains to separating IO from your data model. These are the most obvious gains:
But concurrency and memoization are impure concepts!Yes. But Ffi will only require a perceived purity. What it means is that it will be possible to call impure functions using So why is it so difficult to implement side-effects in Elchemy?Mostly because we want to be as compatible with Elm's existing libraries as possible. And although surprisingly little libraries use So isn't that just all about copying what Elm (TEA) has?Unfortunately no. There are 3 characteristics of TEA that would make it a terrible choice for backend programming.
So what can we do?This a question we were trying to answer for last 6 months and there was a lot of smart people that spent their time to help me come up with the best solution. |
Wow, Thanks! I didn't expect such a detailed answer. I think it's worth to be link in the Readme. |
Addressed in README 👍 |
This is so clear and on point, congratulations ^-^ |
Hi,
Being a total newbie in Elm and Elixir, and I have a few questions about side effect in elchemy:
Quoting the README:
I'm not sure how to interpret this. Do you mean Interop (which is 90% ready) should only be used for pure computation (only crushing numbers, this kind of things)? Also, side effects and core (filesystem, OTP, etc..) are 5% which seems to indicate you have already some thoughts on it. I'm probably too curious but I would like to know your early thought on this topic if possible. Especially, since side effect and such like tasks related to filesystem and stuff can often fail. Moreover since Elm has no exceptions, it appears at first glance that there is no easy way to reconcile those 2 worlds.
Thanks
The text was updated successfully, but these errors were encountered: