Conversation
A box is something that runs before and after a [Fmt.t]. This ensures that the corresponding "open" and "close" part are properly balanced by always maintaining them together.
|
Note that we already use functional boxes (eg. Only the code formatting modules uses imperative open/close functions and this is not making it safe (a little safer but not safe) and requires extra |
|
I think that the main two benefits to this approach are:
|
|
(this is not for immediate merge and won't solve all our issues but it's a good starting point to discuss some improvements - the API can be made lighter as well) |
I don't agree. The unsafe part of I don't think we have an abstraction problem. The unsafe open/close functions are only used marginally and will be removed in the future. |
|
Marking Lines 3672 to 3685 in fdbd2f5 It does not contain a call to Does this make sense? |
|
That makes sense. But I suggest to change this code to not use these functions instead. We tried before and did not succeed, though. |
|
We'll find something better, closing. |
A box is something that runs before and after a
Fmt.t. This ensures that the corresponding "open" and "close" part are properly balanced by always maintaining them together.(This might be superseded by #1074)