@Centril
So, the difference of opinion seems to be that you’d like to implement try blocks and built on top of those.
I’d respond that the core point of the issue is to allow delying of the try/catch/throw strategy, including try and allow experimentation and consideration of the error handling strategy as a whole.
Ostensibly, one difference where try { … } is more constrained is that it requires the resulting expression to implement Try;
I believe that is quite a big constraint. Experimentation would be more open if the control flow option were available in many scenarios, like custom composable DLSs not needing to resort to closures and return to implement early propagation.
My preference is that this should be opt-out rather than opt-in. I do think that try { … } should be idiomatic.
As you can imagine, I’m against that
I believe if try blocks were to be added, they should have a limited use. With combinator methods like map or and_then always being first-choice over try blocks unless there are good reasons.
I don’t think that is an accurate description; 'escape constitutes a magical label that adds to the language. I also think that the form 'escape: { … } is much too subtle for such important control flow and inconsistent with the language at large for the moment; I understand that it is meant to be hidden under a macro; but at this point, you are just eventually reinventing try { … }.
Yes, that is the point
Instead of adding exception like error handling piece by piece we give the language the ability to express the semantics as macros,
I also think that the rules for try { … } are pretty well discussed by now; the remaining point of contention seems to be Ok-wrapping.
And this is the kind of problem I’d like to avoid. Either option (conversion or not) could theoretically be the right one. But in difference to ? which had try!, we have no way to gain experience with these semantics on a wider scale. Building the whole thing up with macros to allow the semantics to settle would solve that, and also allow to see what semantics have actual need.
If it turns out there are multiple use-cases that can’t go into a single construct, it might even be preferrable to end up with multiple macros in std in the long run.