λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°

빈 ꡬ멍 μ±„μš°κΈ°

[Kotlin] Soft Keyword, Hard Keyword, Modifier Keyword

좜처

ChatGPT

https://www.tutorialspoint.com/kotlin/kotlin_keywords.htm

 

Kotlin - Keywords

Kotlin - Keywords - Kotlin keywords are predefined, reserved words used in Kotlin programming that have special meanings to the compiler. These words cannot be used as an identifier (variables names, package names, function names etc.) and if used then com

www.tutorialspoint.com

https://kotlinlang.org/docs/keyword-reference.html#hard-keywords

 

Keywords and operators | Kotlin

 

kotlinlang.org

 

https://medium.com/@joongwon/kotlin-kotlin-%ED%82%A4%EC%9B%8C%EB%93%9C-%EB%B0%8F-%EC%97%B0%EC%82%B0%EC%9E%90-%ED%95%B4%EB%B6%80-1-hard-keywords-3062f5fe2d11

 

[Kotlin] Kotlin ν‚€μ›Œλ“œ 및 μ—°μ‚°μž ν•΄λΆ€ Part 1

μ˜€λŠ˜μ€ Kotlinμ—μ„œ μ‚¬μš©λ˜λŠ” ν‚€μ›Œλ“œ 및 μ—°μ‚°μžμ— λŒ€ν•΄μ„œ μ•Œμ•„λ³΄λ„λ‘ ν•˜κ² λ‹€. μΌλΆ€λŠ” ꡳ이 μ„€λͺ…을 μ•ˆ 해도 이해가 μ‰¬μš΄ μ΅μˆ™ν•œ 것듀이 있기 λ•Œλ¬Έμ— μ œμ™Έν•˜μ˜€κ³  이 글을 μ½λŠ” 뢄듀은 기본적인 ν”„λ‘œ

medium.com

https://medium.com/@joongwon/kotlin-kotlin-%ED%82%A4%EC%9B%8C%EB%93%9C-%EB%B0%8F-%EC%97%B0%EC%82%B0%EC%9E%90-%ED%95%B4%EB%B6%80-2-soft-keywords-b3a70cc16955

 

[Kotlin] Kotlin ν‚€μ›Œλ“œ 및 μ—°μ‚°μž ν•΄λΆ€ Part 2

μ§€λ‚œλ²ˆμ— μ΄μ–΄μ„œ μ˜€λŠ˜μ€ Soft Keywords 에 λŒ€ν•΄μ„œ μ•Œμ•„λ³΄μž. 막상 μ‹œμž‘μ€ ν–ˆμ§€λ§Œ 양이 λ§Žμ•„μ„œ 살짝 ν›„νšŒ 쀑이닀.. λ”λΆˆμ–΄ 양념을 쑰금 치자면 ν•„μžκ°€ μš”μ¦˜ κΈˆμ—° 쀑에 μžˆλ‹€. κΈˆμ—°μ„ ν•˜λ‹€ λ³΄λ‹ˆ 살짝 λΆ€

medium.com

https://kotlinlang.org/docs/keyword-reference.html

 

Keywords and operators | Kotlin

 

kotlinlang.org

 


ν‚€μ›Œλ“œ(Keyword)의 의미

ν”„λ‘œκ·Έλž˜λ°μ—μ„œ ν‚€μ›Œλ“œλž€ 언어에 λ‚΄μž₯된 μ˜ˆμ•½μ–΄λ‘œ, νŠΉμ • κΈ°λŠ₯μ΄λ‚˜ λͺ…령을 λ‚˜νƒ€λ‚Έλ‹€. κ°œλ°œμžλŠ” 이 ν‚€μ›Œλ“œλ₯Ό λ³€μˆ˜λ‚˜ ν•¨μˆ˜ μ΄λ¦„μœΌλ‘œ μ‚¬μš©ν•  수 μ—†λ‹€. 예λ₯Ό λ“€μ–΄, μžλ°”μ˜ class, if, for와 같은 단어듀은 ν‚€μ›Œλ“œλ‘œ, 미리 μ •μ˜λœ κΈ°λŠ₯을 가지고 μžˆλ‹€.

 

μ½”ν‹€λ¦° ν‚€μ›Œλ“œλŠ” μ½”ν‹€λ¦° ν”„λ‘œκ·Έλž˜λ°μ—μ„œ μ‚¬μš©λ˜λŠ” 미리 μ •μ˜λœ μ˜ˆμ•½μ–΄λ‘œ, μ»΄νŒŒμΌλŸ¬μ—κ²Œ νŠΉλ³„ν•œ 의미λ₯Ό κ°–λŠ”λ‹€.

 

μ½”ν‹€λ¦° ν‚€μ›Œλ“œλŠ” μ„Έ κ°€μ§€μ˜ λ²”μ£Όλ‘œ λΆ„λ₯˜λœλ‹€. 1) Hard Keyword, 2) Soft Keyword, 3) Modifier Keyword이닀.

 

1) Hard Keywords

νŠΉμ • 문법적인 κΈ°λŠ₯을 μˆ˜ν–‰ν•œλ‹€. 

 

Hard Keywordλ“€μ˜ 상세 μ„€λͺ…은 λ‹€λ₯Έ κΈ€λ“€μ—μ„œ μ›Œλ‚™ 잘 μ„€λͺ…λ˜μ–΄ μžˆλ‹€.

https://medium.com/@joongwon/kotlin-kotlin-%ED%82%A4%EC%9B%8C%EB%93%9C-%EB%B0%8F-%EC%97%B0%EC%82%B0%EC%9E%90-%ED%95%B4%EB%B6%80-1-hard-keywords-3062f5fe2d11

 

[Kotlin] Kotlin ν‚€μ›Œλ“œ 및 μ—°μ‚°μž ν•΄λΆ€ Part 1

μ˜€λŠ˜μ€ Kotlinμ—μ„œ μ‚¬μš©λ˜λŠ” ν‚€μ›Œλ“œ 및 μ—°μ‚°μžμ— λŒ€ν•΄μ„œ μ•Œμ•„λ³΄λ„λ‘ ν•˜κ² λ‹€. μΌλΆ€λŠ” ꡳ이 μ„€λͺ…을 μ•ˆ 해도 이해가 μ‰¬μš΄ μ΅μˆ™ν•œ 것듀이 있기 λ•Œλ¬Έμ— μ œμ™Έν•˜μ˜€κ³  이 글을 μ½λŠ” 뢄듀은 기본적인 ν”„λ‘œ

medium.com

 

https://kotlinlang.org/docs/keyword-reference.html#hard-keywords

 

Keywords and operators | Kotlin

 

kotlinlang.org

 

as as? break class continue do else false
for fun if in !in interface is !is
null object package return super this throw true
try typealias typeof val var when while -

 

2) Soft Keywords

νŠΉμ •ν•œ λ¬Έλ§₯μ—μ„œ ν‚€μ›Œλ“œλ‘œ μ‚¬μš©λ˜κ³ , λ‹€λ₯Έ λ¬Έλ§₯μ—μ„œλŠ” 일반적인 μ‹λ³„μžλ‘œ μ‚¬μš©ν•  수 μžˆλ‹€.

 

Soft Keywords 상세 μ„€λͺ…

https://medium.com/@joongwon/kotlin-kotlin-%ED%82%A4%EC%9B%8C%EB%93%9C-%EB%B0%8F-%EC%97%B0%EC%82%B0%EC%9E%90-%ED%95%B4%EB%B6%80-2-soft-keywords-b3a70cc16955

 

[Kotlin] Kotlin ν‚€μ›Œλ“œ 및 μ—°μ‚°μž ν•΄λΆ€ Part 2

μ§€λ‚œλ²ˆμ— μ΄μ–΄μ„œ μ˜€λŠ˜μ€ Soft Keywords 에 λŒ€ν•΄μ„œ μ•Œμ•„λ³΄μž. 막상 μ‹œμž‘μ€ ν–ˆμ§€λ§Œ 양이 λ§Žμ•„μ„œ 살짝 ν›„νšŒ 쀑이닀.. λ”λΆˆμ–΄ 양념을 쑰금 치자면 ν•„μžκ°€ μš”μ¦˜ κΈˆμ—° 쀑에 μžˆλ‹€. κΈˆμ—°μ„ ν•˜λ‹€ λ³΄λ‹ˆ 살짝 λΆ€

medium.com

 

https://kotlinlang.org/docs/keyword-reference.html#soft-keywords

 

Keywords and operators | Kotlin

 

kotlinlang.org

 

by catch constructor delegate dynamic field
file finally get import init param
property receiver set setparam value where

 

 

3) Modifier Keywords

클래슀, ν•¨μˆ˜, λ³€μˆ˜ 등에 νŠΉμ • λ™μž‘μ΄λ‚˜ κ°€μ‹œμ„± μ œμ–΄λ₯Ό μΆ”κ°€ν•˜λŠ” 역할을 ν•˜λŠ” ν‚€μ›Œλ“œλ“€μ΄λ‹€. 이λ₯Ό 톡해 μ ‘κ·Ό μ œμ–΄, 상속 μ œμ–΄, μ΄ˆκΈ°ν™” μƒνƒœ 등을 관리할 수 μžˆλ‹€.

 

Modifier Keywords 상세 μ„€

https://kotlinlang.org/docs/keyword-reference.html#modifier-keywords

 

Keywords and operators | Kotlin

 

kotlinlang.org

 

abstract actual annotation companion const crossinline data enum
expect external final infix inline inner internal lateinit
noinline open operator out override private protected public
reified sealed suspend tailrec vararg - - -