📰 2026-05-03 03:30 更新
🔸 Unsigned Sizes: A Five Year Mistake / 无符号尺寸:五年的错误
🔗 Unsigned Sizes: A Five Year Mistake
🔥 16 points
原文:
A quick note for readers who don’t follow C3: it’s a systems language in the C tradition. Specifics below are C3’s, but the tradeoffs apply to any language that has to pick a type for sizes and lengths. C3 is moving to signed by default, but why are we doing that? Isn’t unsigned more correct for sizes at least? Let’s try to answer that. The bugs of unsigned Since the early days, C3 has been using unsigned sizes. And while the name of the unsigned type changed over time – from “usize” to “usz”…
译文:
对于不关注C3的读者,请快速注意:它是C传统中的一种系统语言。以下是C3的具体内容,但权衡适用于任何必须为大小和长度选择类型的语言。默认情况下, C3将转为签名,但我们为什么要这样做?至少对于尺寸来说,无符号是不是更正确?让我们试着回答这个问题。未签名的错误自早期以来, C3一直使用未签名的大小。而未签名者的姓名 类型随着时间的推移而改变–从“usize”到“usz”…
自动更新 · 正文抓取 · 双语翻译