Skip to content

Enhancement: Please use complete programs rather than code snippets. #1889

Closed
@haziz

Description

@haziz

While working through the book, I find it frustrating that all the examples given are essentially in the form of code snippets. This combined with the general "fussiness" of the rustc compiler (I realize this is by design), makes working through the examples fairly difficult for a newbie to the Rust language. Giving the examples as full "working" and "compilable" programs would make working through the book much easier. After the full program listing a breakdown of the individual statements, concepts and segments, as code snippets can then be done. I would refer to K&R's The C Programming Language as an example of what I mean.

I do realize that the online version of the "book" has these "play" buttons that do help with some sections. However, for those of us that prefer to type the code in, or occasionally when lazy to just cut and paste, into a working editor and then compiling the code, dealing with why rustc is unhappy with our attempts to wrap enough code around the example code snippet sufficient to produce a compilable, working, program is quite frustrating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked upstreamBlocked on a change that needs to happen in a different repo first

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions