Day1 plan
"Contraints liberates"
Introductions
Why Rust?
Memory Safety
Modern Type System
Compiler does a lot of work to get it right
Borrow Checker for low memory footprint, cons will be only a subset of correct code can be written in safe rust, that's why Rust has unsafe blocks.
What does Rust mean for bitcoin ecosystem?
variables
Why immutable by default
Idea of ownership
Move mechanism
numbers
Representation
Emphasis on correctness
pointers
Demonstrate swapping of two variables
conclusion
"Assuming that you can avoid undefined behavior in C and C++ is like assuming you can win a game of chess simply because you know the rules" - Programming Rust book
Why C? GC golang, Java, Python, JS, Haskell we have performance penalty.
free(pointer to memory location);
A pointer in C is just the address of a byte in your RAM.
Last updated