Hacker News new | ask | show | jobs
by abacate 2301 days ago
Algebraic effects are going to put OCaml on a next level in terms of expressivity, abstraction and decoupling capabilities of separate tasks. It would be like going from a type system like C, with only concrete types, to parametric polymorphism and/or generics.

Multicore is a very nice addition, but the fact that it is going to be coupled with an effect system is a game changer for the language as a whole.

2 comments

I, for one, would gladly trade threaded GC and unchecked effects for checked exceptions... Unless there is a way to implement some kind of poor man checked exceptions with unchecked effects?
Please see [1]. Around 28:45 the talk moves to effect types. At around 29:25 the proposed mechanism (with throw) is literally described as "checked exceptions".

AFAIK, this is all part of the roadmap.

[1] https://www.janestreet.com/tech-talks/effective-programming/

Yes thank you, exactly what I was looking for.
Algebraic effects can do all of that and more. They're all checked, because you must provide handlers for effects you include.
The tutorial sited in that thread [0] explicitly says the opposite though.

[0] https://github.com/ocamllabs/ocaml-effects-tutorial/blob/mas...

Where's the info on that? I don't see any instance of "effect" in OP.