I don't even know how to go about this, but I just thought the idea of being able to execute result builder DSL syntax dynamically would be awesome.
For example, if you are using SwiftHTML DSL, and you would like to add some dynamism to it, maybe you can make the DSL Codable and import/export DSL files on runtime. Or, in Narratore you maybe could import stories you've written in other tools. Or even create our own small live coding environment that fits the project's needs.
I think we can technically do it already, with some effort, but first-class language support would be really nice. Maybe a bit too much to put it in the compiler?
+ Edit: I changed the title to convey my idea more clearly. My point was, it would be great if there were a type-safe way to dynamically evaluate result builder DSLs during runtime. Much safer than just Python/JS style "eval()" things, still offers a lot of dynamism.
What initially came to my mind was to provide a way to write DSL in runtime. Kinda like what Eval Package does, but with your own DSL syntax. With that, users could input simple scripts that does specific things, without the risk of arbitrary code execution. For example, you could make a live coding environment like Sonic Pi or a comprehensive spreadsheet application like Numbers or Excel.
But also, it could be used to import/export functionalities on the fly in runtime. Admittedly, the second idea was an afterthought.