7-04 Reading the Rust docs

🎬 Fifty-eight. Every morning Mina reads a page of Rust documentation. Documentation English has patterns that come up again and again.

Tap any word or chunk to hear it. The small line under each English word is how it actually sounds in Korean letters (linked sounds included); the line over Korean is its sound in Latin letters. ✍️ lets you trace a chunk with your finger or mouse.

📏 Rules in this lesson

1. Doc patterns: 기본적으로 · -면 · 돌려준다 · 참고

Korean docs translate these as 기본적으로, 반환한다, -지 않으면, 참고로.

2. -된다 = passive (is freed, is checked)

Korean passive often uses -되다: 해제되다 (is freed), 검사되다 (is checked).

1The docsSay

Variables붸리어블‿변수들 are저‿-이다 immutable리뮤터블바꿀 수 없는 by default.바이 디푈트기본적으로

변수는byeonsuneunvariables 기본적으로gibonjeogeuroby default 바꿀bakkul(to) change 수suway 없다.eopda.there's no

💡 im- / un- / in- = not.

2The docsSay

To change터 체인지바꾸려면 a어 value,봴류값 declare디클레어선언하다 the variable둬 붸리어블그 변수 with mut.위듸 뮤트mut 로

값을gapseula value 바꾸려면bakkuryeomyeonto change 변수를byeonsureulthe variable mutmutmut 로rowith 선언한다.seoneonhanda.declare

💡 -려면 = in order to (at the start of an instruction).

3The docsSay📌 Whole

This뒤스이 function풩크션함수 returns리턴‿돌려준다 an error저‿ 네러‿오류 if리픠-면 the file둬 퐈일그 파일 does not exist.더즈 나‿ 리그지스트존재하지 않는다

이ithis 함수는hamsuneunfunction 파일이pairithe file 없으면eopseumyeonif (it) doesn't exist 오류를oryureulan error 돌려준다.dollyeojunda.returns

4The docsSay📌 Whole

Each이치각 value봴류값 has해‿가진다 exactly지그잭틀리정확히 one워‿하나의 owner노우너‿주인 at a time.러‿ 러 타임한 번에

각gakeach 값은gapseunvalue 한hanone 번에beoneat a time 정확히jeonghwakiexactly 하나의hanauione 주인만juinmanonly (one) owner 가진다.gajinda.has

5The docsSay📌 Whole

When웬-할 때 the owner둬 오우너주인 goes out of scope,고우‿ 자우‿ 러븨 스코우프범위를 벗어나다 the value둬 봴류그 값 is dropped이즈 드랍‿버려진다 and턴‿그리고 its memory딧츠 메머리그 메모리 is freed.이즈 픠리드해제된다

주인이juinithe owner 범위를beomwireulthe scope 벗어나면beoseonamyeonwhen (it) leaves 값은gapseunthe value 버려지고beoryeojigois dropped, and 그geuits 메모리는memorineunmemory 해제된다.haejedoenda.is freed

💡 범위 = scope; 해제 = release/free (memory).

6The docsSay📌 Whole

The borrow checker둬 바로우 체커빌림 검사기 makes sure메이크스 슈어확실히 하다(보장하다) references레풔런시‿참조 are저‿-이다 always롤웨이즈늘 valid.봴리드유효한

빌림billimborrow 검사기는geomsagineunchecker 참조가chamjogareferences 늘neulalways 유효하도록yuhyohadorokso that (they're) valid 보장한다.bojanghanda.guarantees

💡 보장하다 = to guarantee, make sure.

7The docsSay📌 Whole

Note that노우트 됏주의할 점은 this뒤스이 method메써드메서드 panics패닉‿패닉한다(멈춘다) if시픠-면 the index둬 인덱‿인덱스 is out of bounds.시‿ 자우‿ 러븨 바운즈범위를 벗어나다

참고로chamgoronote that 이ithis 메서드는meseodeuneunmethod 인덱스가indekseugathe index 범위를beomwireulthe range 벗어나면beoseonamyeonif (it) goes outside 패닉한다.paenikanda.panics

💡 참고로 / 주의 = note that — always read the line that follows.

8MinaMy view📌 Whole

I아이나 read레‿읽었다 a whole page더 호울 페이지한 쪽 전부 today터데이오늘 without위돠우‿-없이 a dictionary.러 딕셔네리사전

오늘oneultoday 사전sajeondictionary 없이eopsiwithout 한hanone 쪽을jjogeulpage 다daall 읽었어.ilgeosseo.(I) read

9HanaHeard📌 Whole

Mom맘엄마 said세드말했다 she쉬그녀가 read레드읽었다 the whole chapter둬 호울 챕터‿장 전체 on ownership.라‿ 노우너쉽소유권에 관한 I'm impressed.아이‿ 밈프레스트감탄했다

엄마가eommagaMom 소유권soyugwonownership 장을jangeulchapter 다daall 읽었대.ilgeotdae.says (she) read 대단해.daedanhae.impressive

📌 Learn these whole (7)

Breaking these into words gives the wrong meaning. Memorize each line exactly as it is, sound and all.

  1. 이 함수는 파일이 없으면 오류를 돌려준다.뒤스 풩크션 리턴‿ 저‿ 네러‿ 리픠 둬 퐈일 더즈 나‿ 리그지스트
  2. 각 값은 한 번에 정확히 하나의 주인만 가진다.이치 봴류 해‿ 지그잭틀리 워‿ 노우너‿ 러‿ 러 타임
  3. 주인이 범위를 벗어나면 값은 버려지고 그 메모리는 해제된다.웬 둬 오우너 고우‿ 자우‿ 러븨 스코우프 둬 봴류 이즈 드랍‿ 턴‿ 딧츠 메머리 이즈 픠리드
  4. 빌림 검사기는 참조가 늘 유효하도록 보장한다.둬 바로우 체커 메이크스 슈어 레풔런시‿ 저‿ 롤웨이즈 봴리드
  5. 참고로 이 메서드는 인덱스가 범위를 벗어나면 패닉한다.노우트 됏 뒤스 메써드 패닉‿ 시픠 둬 인덱‿ 시‿ 자우‿ 러븨 바운즈
  6. 오늘 사전 없이 한 쪽을 다 읽었어.아이 레‿ 더 호울 페이지 터데이 위돠우‿ 러 딕셔네리
  7. 엄마가 소유권 장을 다 읽었대. 대단해.맘 세드 쉬 레드 둬 호울 챕터‿ 라‿ 노우너쉽 아이‿ 밈프레스트

📚 Worth reading
🎚️English Modal Verbs: Degrees of Obligation, Ability, and Certainty→ 📏English Comparatives and Superlatives: Rules and Common Patterns→ 🔊English Connected Speech: Why Familiar Words Sound Different→ 🙏Polite English: Showing Respect Without Honorific Endings→