Rust¶
一些被推薦的點 (代研究)¶
Immutable by default, no global variables, private by default
borrow checker
C like performance without nasal demons
no big VM, no GC needed
immutable/private by default
pattern matching
HM-style type inference (Turing complete)
fully hygienic macros
helpful compiler errors, Lint’s built in
great community
Move by default
- channel for concurrency
- Erlang like channel
- https://news.ycombinator.com/item?id=7851274
suitable for hard real time
- I don’t have to worry about aliasing anymore
https://www.reddit.com/r/rust/comments/2x0h17/whats_your_killer_rust_feature
region-based memory management -> lifetime
Rust - Runtime Service¶
隨手用 Valgrind 跑個 Rust 的程式後, 發現有意料之外的 heap 使用, 後來才知道是 Rust std 做的, 之後來了解 Rust 的 Runtime Service 做了什麼事情 ...