Friday, August 19, 2016
Thursday, August 18, 2016
Daily Tag 08/19/2016
-
- Generally speaking, error handling is divided into two broad categories: exceptions and return values. Rust opts for return values.
-
Friday, August 12, 2016
Tuesday, August 9, 2016
Monday, August 8, 2016
Friday, August 5, 2016
Wednesday, August 3, 2016
Daily Tag 08/04/2016
-
- generic functions with a trait bound use ‘monomorphization’ (mono: one, morph: form), so they are statically dispatched.
- This shows off the additional feature of
where
clauses: they allow bounds on the left-hand side not only of type parametersT
, but also of types
-
-
-
self
if it’s a value on the stack,&self
if it’s a reference, and&mut self
if it’s a mutable reference. - Rust doesn’t have method overloading, named arguments, or variable arguments.
-
-
- When we move
v
tov2
, Rust actually does a bitwise copy of the vector objectv
into the stack allocation represented byv2
. This shallow copy does not create a copy of the heap allocation containing the actual data. Which means that there would be two pointers to the contents of the vector both pointing to the same memory allocation on the heap.
-
-
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and without Compromises
tags: zero overhead meta programming
Subscribe to:
Posts (Atom)