Umbrella: Repository Content (Scope)/ TODOs #116
Labels
C-needs discussion
Area: Something that is not clear to everyone if it fixes something/adds valuable content
E-help wanted
Call for participation: Help is requested to fix this issue
Projects
Collection of design patterns and the corresponding issues if not contained in the repository already (in reference to Design patterns (by Gamma, Helm, Johnson, Vlissides)). Some patterns are probably not applicable to/realizable with Rust as they stem from OOP, but we'll sort that out on the way.
But in general I think it is also nice to have
design patterns
listed somewhere on a page that are not applicable to Rust and stated why and with an added workaround if any.Coverage
Patterns
Creational Patterns
Structural Patterns
Behavioural Patterns
Still Uncategorized
by looking at examples such as Rusts
libstd
, and how it integrated into the Rusts source code, lessons can be learned about ergonomic project management and API design. Closely assosciated with platform-specific sub-modulesError
traits andResult
forwardingIdioms
"Vec::drain sets the Vec's len to 0 prematurely so that mem::forgetting Drain "only" mem::forgets more stuff. instead of exposing uninitialized memory or having to update the len on every iteration"
Anti-patterns
Unwrap()
ing everyResult
instead of forwarding itFunctional Programming
Refactoring
unwrap
toResult
General Unsorted
Notes
The markdown source of that post is here and I hereby relicense the content as MPL2 (in addition to CC-BY) and allow you to use it in this repo.
From Reddit
Pre-Pooping Your Pants
Rooting an Rc handle
Precise closure capture clauses
Iterating an over a Rc<Vec<T>>
https://users.rust-lang.org/t/blog-post-series-rust-patterns/20080/10
Push Ifs Up And Fors Down
If a Tree Falls in a Forest, Does It Overflow the Stack?
Destructing trees safely and cheaply
Builder Lite
Caches In Rust
Inline In Rust
Newtype Index Pattern
Typed Key Pattern
Encapsulating Lifetime of the Field
Break on named blocks
Temporarily opt-in to shared mutation
Actors with Tokio
The text was updated successfully, but these errors were encountered: