Date: Sun, 26 Feb 2023 11:30:15 +0100
On 26/02/2023 01.28, Steve Downey via SG16 wrote:
> Unicode algorithms, however, must not over trust their input then. We should not have UB in the std library.
We have plenty of undefined behavior in the standard library.
Everywhere we say "preconditions:", it'is an implied
undefined behavior when you violate that.
If validation comes (almost) for free, I'm all for it, though.
> So that implies that any property lookups for int32 s that aren't scalar values have to say NO and the algorithms should handle that. Many do naturally. But we should not repeat the mistakes of the original C character classification APIs.
Jens
> Unicode algorithms, however, must not over trust their input then. We should not have UB in the std library.
We have plenty of undefined behavior in the standard library.
Everywhere we say "preconditions:", it'is an implied
undefined behavior when you violate that.
If validation comes (almost) for free, I'm all for it, though.
> So that implies that any property lookups for int32 s that aren't scalar values have to say NO and the algorithms should handle that. Many do naturally. But we should not repeat the mistakes of the original C character classification APIs.
Jens
Received on 2023-02-26 10:30:29