RFC 2420: unreserve-proc

lang (syntax | keyword)

Summary

The keyword proc gets unreserved.

Motivation

We are currently not using proc as a keyword for anything in the language. Currently, proc is a reserved keyword for future use. However, we have no intention of using the keyword for anything in the future, and as such, we want to unreserve it so that rustaceans can use it as identifiers.

In the specific case of proc, it is a useful identifier for many things. In particular, it is useful when dealing with processes, OS internals and kernel development.

Guide-level explanation

See the reference-level-explanation.

Reference-level explanation

The keyword proc is removed from the list of reserved keywords and is no longer reserved. This is done immediately and on edition 2015.

Drawbacks

The only drawback is that we're not able to use proc as a keyword in the future, without a reservation in a new edition, if we realize that we made a mistake.

The keyword proc could be used for some Arrow notation as used in Haskell. However, proc notation is rarely used in Haskell since Arrows are not generally understood; and if something is not well understood by one of the most academically inclined of communities of users, it is doubly a bad fit for Rust which has a community mixed with users used to FP, systemsy and dynamically checked programming languages. Moreover, Arrows would most likely require HKTs which we might not get.

Rationale and alternatives

There's only one alternative: Not doing anything.

Previously, this used to be the keyword used for move |..| { .. } closures, but proc is no longer used for anything.

Not unreserving this keyword would make the word unavailable for use as an identifier.

Prior art

Not applicable.

Unresolved questions

There are none.