I don’t think it can. Actually is another reason for RFC: `with ... yield` replacement leave the decision of the DSL-ish on the call-site instead of the implementation might be the way to allow captured blocks in DSL.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| What's making my block a captured block? | 9 | 792 | November 2, 2021 | |
| Can't understand the example code of block yield with self | 5 | 698 | October 31, 2019 | |
| RFC: `with ... yield` replacement | 57 | 3964 | May 14, 2025 | |
| Questions about with..yield | 7 | 374 | January 10, 2024 | |
| Propose: make captured proc type declaration optional | 3 | 268 | January 13, 2024 |