Skip to content

Add most remaining chapters#24

Merged
willcrichton merged 25 commits intomainfrom
beta
Jul 7, 2025
Merged

Add most remaining chapters#24
willcrichton merged 25 commits intomainfrom
beta

Conversation

@tgiannak
Copy link
Collaborator

Added chapters on

  • visitor pattern,
  • PIMPL,
  • RVO and NRVO,
  • placement new,
  • FFI,
  • build systems, and
  • documentation tools.

Added quizzes to chapters on

  • visitor pattern,
  • adapter pattern,
  • iterators,
  • closures,
  • expected errors, and
  • errors from bugs.

Also fixed a typos in a few chapters.

tgiannak and others added 25 commits June 20, 2025 11:34
Separating construction and initialization is generally frowned upon in
C++, and so the chapter isn't likely to be useful. The material that was
there definitely isn't for the situations where separate construction
and initialization is likely to be used. The material that would be
relevant is covered already in other chapters, like the one on re-using
buffers.
While the Rustonomicon does not provide side-by-side examples between C
or C++ and Rust, the chapter does comprehensively discuss the concerns a
C++ programmer would have about using the Rust FFI.
The chapter is mostly an index into other relevant materials, such as
the Cargo book.
As it was it seemed like the chapter was going to be about applying
those tools to Rust.
The chapters were either moved or removed.
The change was missed when renaming a file in a previous commit.
Two fixes:

- Making `Any` a supertrait suffices, because trait upcasting was
  stabilized in 1.86.

- It is the visitor that has to support downcasting, not the
  visited objects.
@willcrichton willcrichton merged commit 46c2b52 into main Jul 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments