Post #1758315
2026-04-20 14:14 UTC
@leeloo @Sarnau @mayo @dasdom Because of the way string substitutions work in the Swift/Obj-C/SwiftUI/UIKit/AppKit world.
If you write `"Cannot \(action) because \(reason)"`, the compiler generates code similar to `StringInterpolation(…).appendLiteral("Cannot ").appendInterpolation(action).appendLiteral(" because ").appendInterpolation(reason)`. This would show up as "Cannot " and " because " in the binary.
For localizable strings, something like "Cannot %@ because %@" would show up.
Replies (1)
-
@leeloo@c.im 2026-04-20 14:24
@teilweise @Sarnau @mayo @dasdom Try making action and reason constants and make sure you have optimization turned on (may need debug build turned off and strip the binaries as well). This is so simple an optimization that even a 25 year old compiler should be able to do it. It will take more than words to convince me that Apple are that bad at writing compilers.