'unsafe' is the final holdout keyword that can still be used as an ident, and we love using it as a module name: core::unsafe, core::vec::unsafe, core::str::unsafe, core::at_vec::unsafe.

In order to convert 'unsafe' to a true keyword we need a different strategy for coralling unsafe functions. There are two options: 1) pick a different name for unsafe modules, 2) move all the unsafe functions up a level so they aren't in their own mod (since unsafety is part of the type they don't _need_ to be otherwise marked unsafe).

Here's how it reads now:

  vec::unsafe::frob_bytes()

Here are some possible alternate names:

  vec::risky::frob_bytes()
  vec::danger::frob_bytes()
  vec::dangerous::frob_bytes()
  vec::chancy::frob_bytes()
  vec::unsaf::frob_bytes()

Personally, I do think it is useful continue putting all the unsafe code into a submodule. I also can't think of a new name that I like.

So I don't have any great ideas. Do you?

-Brian
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to