Go to file
osmannyildiz 2f7dcfd2bd add readme and notes 2024-04-29 14:53:22 +03:00
src day 2 (240428) 2024-04-29 14:42:55 +03:00
.gitignore day 1 (240427) 2024-04-27 17:41:39 +03:00
Cargo.lock day 1 (240427) 2024-04-27 17:41:39 +03:00
Cargo.toml day 1 (240427) 2024-04-27 17:41:39 +03:00
README.md add readme and notes 2024-04-29 14:53:22 +03:00

README.md

Rust Weekend - April 27-28, 2024

My Notes

There are code-based notes in the file src/main.rs. I recommend tinkering with it, like commenting/uncommenting portions, reading compiler errors, and looking at the types in your IDE.

Plain text notes are below.

cargo init -> existing dir
cargo new -> new subdir

compiler doesn't check against infinite loops

access modifiers:
- private (default)
- pub
- pub(crate)

Ownership kuralları:
- Bir şeyin sadece bir sahibi olur
- Bir şeyin birim zamanda tek sahibi olur
- Bir şey gerekli olmadığında drop edilir
Bunun 3 uygulanış biçimi vardır:
- Copy (veri transferi, fixed size)
- Move (move semantic/ownership transfer, non-fixed size)
- Clone (birebir aynısını oluşturma, non-fixed size)

Borrowing için & operatörü kullanılır. 2 çeşidi vardır:
- Immutable borrowing/shared reference (1:N, sanat galerisi/ziyaretçi ilişkisi)
- Mutable borrowing (1:1, kiracı/ev sahibi ilişkisi)

rust'ta method overloading (aynı isim farklı parametre) yok