I’m glad we can agree at least that there has to be a problem somewhere. However I don’t subscribe to the notion that I am less worthy of properly formatted output than are others. Given that there is a direct mechanical translation possible as seen in the workaround, I cannot fathom why one would take the position that this SHOULD be a compile-time error. A compile time error is less broken than simply ignoring the formatting string, yes, but it’s still broken.
This has already been acknowledged as a “known issue” but the response is discouraging:
This is a known issue with implementations of Debug and Display, and unfortunately there is no real way to statically enforce that all formatting flags are respected while also maintaining efficiency. You’re always able to allocate an intermediate String and then apply the formatting flags to that but otherwise requiring implementations to respect these flags would hamstring the performance.
Let’s separate the question of static enforcement of the formatting flags from the implementation of them. The first is a luxury, the second is simple correctness. So the comment is initially non-responsive: static enforcement of the flags is not the issue. The second sentence makes the problem seem much worse than I’d realized, since it’s not limited to Debug. The implication is that the correctness of string composition is dependent on the explicit cooperation of every implementation which processes a value. Probably I’m misunderstanding something because it’s hard to believe it would be designed that way.
I guess there’s always sprintf.