day 1
This commit is contained in:
17
class/notes
17
class/notes
@@ -158,5 +158,20 @@ traits!
|
||||
type conversions in a generic way
|
||||
x.into() will do the type conversion for you, if valid and lossless
|
||||
|
||||
const - compile time const, like #DEFINE
|
||||
|
||||
value of shadowing - one of the benefits of dynamic typed -- you have the same logical object, but it's transforming, you wanna keep the same name
|
||||
|
||||
memory management
|
||||
|
||||
stack / heap
|
||||
|
||||
shared xor mutable
|
||||
|
||||
explicit lifetimes:
|
||||
tick a
|
||||
var<'a>(p1: &'a Point, p2: &'a Point') -> &'a Point{}
|
||||
|
||||
erase(var) // you can delete a var...
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user