๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์ „์ฒด ๊ธ€

(374)
[ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ] ์—ํƒ€ ๋ณ€ํ™˜ eta conversion ์ถœ์ฒ˜ChatGPThttps://sookocheff.com/post/fp/eta-conversion/ Eta ReductionThe purpose of eta reduction (also written \(\eta\)-reduction) is to drop an abstraction over a function to simplify it. This is possible when there is nothing more that a function can do to its argument. For example, imagine that we have a simple functionsookocheff.comhttps://library.fiveable.me/key-terms/programming-languages..
[Java][Kotlin] ๊ฐ€์‹œ์„ฑ ๋ณ€๊ฒฝ์ž ์ฐจ์ด ๋น„๊ต ๋ถ„๋ฅ˜์ž๋ฐ”์ฝ”ํ‹€๋ฆฐ๊ธฐ๋ณธ ๊ฐ€์‹œ์„ฑํด๋ž˜์Šค, ๋ฉ”์„œ๋“œ, ํ•„๋“œ์˜ ๊ธฐ๋ณธ ๊ฐ€์‹œ์„ฑ์€ ํŒจํ‚ค์ง€๋กœ ๊ฒฐ์ •๋œ๋‹ค. ๊ฐ€์‹œ์„ฑ ๋ณ€๊ฒฝ์ž๋ฅผ ์ง€์ •ํ•˜์ง€ ์•Š์œผ๋ฉด ํ•ด๋‹น ์š”์†Œ๋Š” ๋™์ผํ•œ ํŒจํ‚ค์ง€ ๋‚ด์—์„œ๋งŒ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•˜๋‹ค.๊ธฐ๋ณธ ๊ฐ€์‹œ์„ฑ์€ public์ด๋‹ค. ๋ณ„๋„์˜ ๊ฐ€์‹œ์„ฑ ๋ณ€๊ฒฝ์ž๋ฅผ ์ง€์ •ํ•˜์ง€ ์•Š์œผ๋ฉด ํ•ด๋‹น ํด๋ž˜์Šค๋‚˜ ๋ฉ”์„œ๋“œ๋Š” ์–ด๋””์„œ๋“  ์ ‘๊ทผ ๊ฐ€๋Šฅํ•˜๋‹ค.๊ฐ€์‹œ์„ฑ ๋ณ€๊ฒฝ์ž ๋น„๊ตpublicํด๋ž˜์Šค, ๋ฉ”์„œ๋“œ, ํ•„๋“œ ๋ชจ๋‘ ๋ชจ๋“  ๊ณณ์—์„œ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•˜๋‹ค.์ž๋ฐ”์™€ ๋™์ผํ•˜๊ฒŒ ๋ชจ๋“  ๊ณณ์—์„œ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•˜๋‹ค.privateํด๋ž˜์Šค ๋‚ด๋ถ€์—์„œ๋งŒ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•˜๋‹ซ.๊ฐ™์€ ํด๋ž˜์Šค ์•ˆ์—์„œ๋งŒ ์ ‘๊ทผ์ด ํ—ˆ์šฉ๋œ๋‹ค.์ž๋ฐ”์™€ ๋™์ผํ•˜๊ฒŒ ๊ฐ™์€ ํด๋ž˜์Šค ๋‚ด๋ถ€์—์„œ๋งŒ ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•˜์ง€๋งŒ, ๊ฐ™์€ ํŒŒ์ผ ๋‚ด์˜ ์ตœ์ƒ์œ„ ์ˆ˜์ค€์˜ ์„ ์–ธ์— ๋Œ€ํ•ด์„œ๋„ private๊ฐ€ ์ ์šฉ๋  ์ˆ˜ ์žˆ๋‹ค.ํŒŒ์ผ ๋‚ด์— ์—ฌ๋Ÿฌ ํด๋ž˜์Šค๊ฐ€ ์žˆ์œผ๋ฉด ๋‹ค๋ฅธ ํด๋ž˜์Šค์—์„œ ์ ‘๊ทผ์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹คprotected๋™..
[Kotlin] Local Functions ๋กœ์ปฌ ํ•จ์ˆ˜ ์ถœ์ฒ˜https://kotlintutorial.io/local-functions-in-kotlin/ Local functions in KotlinIn Kotlin there are local functions that can be defined within a larger function. These functions are only visible within this larger function and cannot be accessed from outside. Local functions have the advantage of making code more readable and clear bykotlintutorial.ioChatGPThttps://cornswrold.tistory.com/464 [Ko..
[ํ”„๋กœ๊ทธ๋ž˜๋ฐ] ๋ฉ”์„œ๋“œ ์ถ”์ถœ ๋ฆฌํŒฉํ† ๋ง Extract Method ์ถœ์ฒ˜https://zaengle.com/blog/refactoring-techniques-extract-method Refactoring Techniques: Extract Method | Zaengle CorpInsights on refactoring techniques focusing on the extract method and Martin Fowlers's book Refactoring - Improving the Design of Existing Code.zaengle.comhttps://hceris.com/the-humble-extract-method/ The Humble Extract MethodThe extract method refactoring is a low-cost, high-imp..
[Kotlin] Infix call ์ค‘์œ„ ํ˜ธ์ถœ ์ถœ์ฒ˜https://torbjorn.tistory.com/753 [Kotlin] infix call (์ค‘์œ„ ํ˜ธ์ถœ)์ฝ”ํ‹€๋ฆฐ์—์„œ๋Š” ํ•จ์ˆ˜์— infix ํ‚ค์›Œ๋“œ๋ฅผ ๋ถ™์—ฌ ๋ฉ”์†Œ๋“œ๋กœ ์ค‘์œ„ํ˜ธ์ถœ์„ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค public infix fun A.to(that: B): Pair = Pair(this, that) ์˜ˆ๋ฅผ ๋“ค๋ฉด Pair๋ฅผ ๋งŒ๋“œ๋Š” to ๋ฉ”์†Œ๋“œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค val numToEng = mapOf( 1 to "one",torbjorn.tistory.comhttps://kotlinlang.org/docs/functions.html#infix-notation Functions | Kotlin kotlinlang.orgChatGPT์ค‘์œ„ ํ˜ธ์ถœ(Infix call)์€ ์ฝ”ํ‹€๋ฆฐ์—์„œ ํŠน์ •ํ•œ ํ•จ์ˆ˜ ํ˜ธ์ถœ ๋ฐฉ์‹์ด๋‹ค. ํ•จ์ˆ˜ ์ด๋ฆ„์„ ๋‘ ์ธ์ž ์‚ฌ์ด..
[Kotlin] Soft Keyword, Hard Keyword, Modifier Keyword ์ถœ์ฒ˜ChatGPThttps://www.tutorialspoint.com/kotlin/kotlin_keywords.htm Kotlin - KeywordsKotlin - 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 comwww.tutorialspoint.comhttps://kotlinlang.org/docs/keyword-..
[Kotlin] ์™œ ํŒŒ์ผ ํ•˜๋‚˜์— ์—ฌ๋Ÿฌ ํด๋ž˜์Šค๋“ค์„ ์„ ์–ธํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ–ˆ์„๊นŒ ์ถœ์ฒ˜https://kotlinlang.org/docs/coding-conventions.html#source-file-names Coding conventions | Kotlin kotlinlang.orghttps://engineering.salesforce.com/building-data-pipelines-using-kotlin-2d70edc0297c/ Building Data Pipelines Using Kotlin - Salesforce Engineering BlogWe selected Kotlin as an alternative for our backend development to address some of Java’s shortcomings.engineering.salesforce.comCh..
[Kotlin] statement(๋ฌธ)์™€ expression(์‹) ์ถœ์ฒ˜Kotlin In ActionChatGPThttps://blog.kotlin-academy.com/kotlin-programmer-dictionary-statement-vs-expression-e6743ba1aaa0 Kotlin programmer dictionary: Statement vs ExpressionStatement and expression are two important terms which are commonly misunderstood. Let’s start explanation from the expression term.blog.kotlin-academy.com 1. Expression ์‹๊ฐ’์„ ๋ฐ˜ํ™˜ํ•˜๋Š” ์ฝ”๋“œ. ๋‹ค๋ฅธ ์‹์˜ ํ•˜์œ„ ์š”์†Œ๋กœ ๊ณ„์‚ฐ์— ์ฐธ์—ฌํ•  ์ˆ˜ ์žˆ๋‹ค.์ฝ”ํ‹€๋ฆฐ์—์„œ ๋ชจ๋“  ํ•จ์ˆ˜๋“ค์€..