Avatar
omochimetaru 1/8/2026 12:48 AM
Joe_Groff 5h A lot of existing Swift projects also use the name Box for a generic reference-counted on-heap wrapper class (for instance, searching language:swift "class Box<" on Github gives more than a thousand hits), which might be part of the confusion here. As such, although that's the name Rust uses, Box might not be the best name for a uniquely-owned value buffer in the Swift standard library, given existing practice.
(edited)
12:49 AM
「Rustではユニークヒープバッファだけど、Swiftだと人々が書いてるBoxはただのクラスラッパーで参照カウントヒープバッファだから、慣習を考慮して名前を変えた方がいいかも」
12:52 AM
むずいなーこれ オーナーシップ自体がRustの追いかけみたいなもんだし寄せてBox, Mut, Ref にした方がわかりやすいと思うけど
12:52 AM
Rust知らない人にはとっつきにくいよな
12:52 AM
同じようなdynとかimplとかもSwiftでは全部違う名前になったし