Skip to content

Docs for primitive type helper modules should stay in their lane #92777

Closed
@camsteffen

Description

@camsteffen

Summary of primitive types with corresponding std modules:

Primitive type std module std module docs first line
array std::array Helper functions and types for fixed-length arrays.
char std::char A character type.
slice std::slice A dynamically-sized view into a contiguous sequence, [T].
str std::str Unicode string slices.
pointer std::ptr Manually manage memory through raw pointers.
f32 std::f32 Constants specific to the f32 single-precision floating point type.
f64 std::f64 Constants specific to the f64 double-precision floating point type.

Some of the std modules' documentation sound like documentation for the primitive type itself. Others do not. The std::slice and slice docs almost look like they are supposed to be identical but there are some minor (perhaps accidental) differences. std::ptr has some unique content that may be better fit for the pointer docs.

In general, I think the std docs should be very brief and primarily work as a signpost pointing to the primitive type docs. But of course they should also document the module itself, without sounding like "I am char". Some more specific conventions could be established.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions