This should absolutely be built on top of compile-time constant expressions and could be done entirely in the library once the feature is implemented and powerful enough. I'd love to see a @compilerEvaluable init(_ url: StaticString)
that does exactly what you describe.
8 Likes