Result builders versus private types

I'm working on a result builder, and running into a problem where I'm having to make some of my implementation details public. Since a result builder essentially transforms the code in place, all types involved (eg those used to hold intermediate results) must be made public even if they're supposed to be implementation details and not used outside the result builder.

Anyone else run into this? Have you found any good ways to deal with it?

We use some in 5.7 where possible to hide the type, and otherwise underscore the public name to keep Xcode from documenting/autocompleting it.

4 Likes