Well since swizzle takes a string literal it should be known at compile time, so instead of doing if ch in ..., maybe do when? Not sure how happy the compiler will be but yeah. Like you said, maybe it should be a macro/template