|
|
Log in / Subscribe / Register

Beingessner: Rust's Unsafe Pointer Types Need An Overhaul

Beingessner: Rust's Unsafe Pointer Types Need An Overhaul

Posted Mar 22, 2022 13:01 UTC (Tue) by tialaramex (subscriber, #21167)
In reply to: Beingessner: Rust's Unsafe Pointer Types Need An Overhaul by jhoblitt
Parent article: Beingessner: Rust's Unsafe Pointer Types Need An Overhaul

Avoiding this problem as much as possible is the goal of Rust's Editions system, even for Unsafe, and that's called out in this article. Rust has seen the last of big sweeping changes like garbage collection, but Editions enable it to be more agile than languages like C or C++ without the trauma associated with something like Python 3.x

Importantly Editions respect time's arrow. You write new code the new way, and your old code is unchanged. 10M lines or 10B lines doesn't matter, you aren't required to touch any of it. But Editions change how people think about what's possible and that means both that more adventurous changes are considered (knowing Editions might make the change practicable), and so often changes which wouldn't have been conceived at all without editions, ultimately turn out not to be incompatible and so the benefits accrue to everybody, not just on new editions.


to post comments

Beingessner: Rust's Unsafe Pointer Types Need An Overhaul

Posted Mar 22, 2022 16:40 UTC (Tue) by jhoblitt (subscriber, #77733) [Link] (2 responses)

Supporting multiple different language versions is not a Rust innovation. I don't know what language can claim the original invention but perl 5 had `use 5.024_001;` in the 90s.

Beingessner: Rust's Unsafe Pointer Types Need An Overhaul

Posted Mar 22, 2022 19:01 UTC (Tue) by khim (subscriber, #9252) [Link]

Technically nothing in Rust is Rust innovation and most ideas it uses were already old when it was conceived. Heck, it was presented to the world with words technology from the past come to save the future from itself!

But most compileable “mainstream” language are based on ideas so ancient that even these, pretty old and well-tested ideas are looking like some kind of radical revelation to C/C++/ObjectPascal/etc developers (Swift took some of these ideas, though).

Beingessner: Rust's Unsafe Pointer Types Need An Overhaul

Posted Mar 24, 2022 7:28 UTC (Thu) by roc (subscriber, #30627) [Link]

Editions aren't quite the same as multiple language versions. A significant amount of effort is required to ensure that a module using edition X links with and works correctly with any module using edition Y. This somewhat constrains what changes are allowed between editions, but it's a super important property.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds