News for hackers. Stuff that matters.
Re:I Believe Zig Has Function Colors by the_duke on Saturday April 09, 2022 @05:54AM (#30966592)
What you want is an effect system.

Check out Koka lang for a very interesting implementation: https://koka-lang.github.io/koka/doc/book.html#why-effects

Re:I Believe Zig Has Function Colors by artemonster on Saturday April 09, 2022 @06:09AM (#30966674)
I wonder how many times people will have to reinvent algebraic effects until it becomes mainstream :)
Re:I Believe Zig Has Function Colors by mananaysiempre on Saturday April 09, 2022 @10:33AM (#30968376)
I know this is a very basic question, but what is it about algebraic effects that makes them compose when monad transformers don’t? I’ve read some of Bauer’s early Eff work, which IIUC was explicitly motivated by this, but for all the neat stuff about resumable exceptions and delimited control and whatnot I don’t feel I ever saw (or recognized) the definitive answer to this.
Re:I Believe Zig Has Function Colors by the_duke on Saturday April 09, 2022 @06:25AM (#30966758)
Until a large company either creates and heavily invests in a new language, or integrates an effect system into a very popular language like C# or Java.

Sadly I don't see that happening anytime soon.

Re:I Believe Zig Has Function Colors by staticassertion on Saturday April 09, 2022 @12:19PM (#30969349)
Oh yeah, I know.