|
|
|
|
|
by tialaramex
1695 days ago
|
|
The appropriate constraint is well known and exists in several languages. The magic format strings mustn't be variables. In Swift there's a type StaticString which matches literals like "This is some text" but is not used for any interpolated strings, or other arbitrary variable values. Of course just because the constraint is known doesn't mean (as you illustrate) that everybody knows about it or makes use of it in their own programming. |
|