3 ms·
How hard would it be to make a liner for the common cases if this? I'd expect most format strings to be literals (no concatenation or anything), passed to the f
by scottlamb 8y ago
How hard would it be to make a liner for the common cases if this? I'd expect most format strings to be literals (no concatenation or anything), passed to the formatting API in a way that can be easily statically determined. Any use of YYYY without we should be assumed to be a mistake.
It can also be detected at runtime. Debug builds could warn it crash.
Future APIs just shouldn't have YYYY mean this. Use another letter.
- scottlamb 8y agoBad autocorrect / typos: * s/liner/linter/ * s/we/ww/ * s/warn it crash/warn or crash/ Sorry; I typed this comment on my phone in a hurry, then didn't look at it again until I could no longer edit it.