Skip to content

"Unsafe Ferris" may be misleading and/or a barrier to entry #2555

@adlerd

Description

@adlerd

Currently the first (and only, for the first 18 chapters) definition someone reading the Book cover-to-cover will receive for "unsafe" is in the introduction section, like this:

Ferris will also help you distinguish **code that isn’t meant to work**:
...
This code block contains unsafe code.

I hope it's clear why this is not a good definition for "unsafe", but also it may be serving as an unnecessary barrier for people new to the language to feel that unsafe code is not an area they can ever become proficient in!

When considering ways this problem could be addressed; e.g. moving "unsafe Ferris" out of the table or some other way to clarify that the definition "code that isn't meant to work" doesn't apply to unsafe rust, I discovered that the attribute seems to only be used in chapter 19.1, titled "Unsafe Rust". My first suggestion then would be to just remove unsafe Ferris altogether; it doesn't seem to add much advantage over the appearance of unsafe keyword in the code and again may be disadvantaging people who try to interpret it without the background context long-time rustaceans have.

If there is interest in this idea I can open a PR to simply remove unsafe Ferris, but I didn't want to open such a PR without some kind of "ack" first since it could be taken the wrong way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions