본문 바로가기
Kotlin

코틀린 소개 Kotlin

by 각종 잡상식 지식 모음 2023. 9. 14.
반응형

코틀린 소개 Kotlin

Kotlin은 Intellij IDEA라는 가장 지능적인 Java IDE의 공식 디자이너 JetBrains가 2011년 도입한 프로그래밍 언어입니다.
Kotlin은 지금까지 무료였으며 앞으로도 계속 무료입니다.
Apache 2.0 라이선스로 개발되었으며 소스 코드는 GitHub에서 사용할 수 있습니다.

Kotlin is a programming language introduced by JetBrains in 2011, the official designer of the most intelligent Java IDE, named Intellij IDEA. Kotlin is free, has been free and will remain free. It is developed under the Apache 2.0 license and the source code is available on GitHub.

이것은 JVM에서 실행되는 강력하게 정적으로 타입이 지정된 범용 프로그래밍언어입니다.
2017년 Google은 #Kotlin#Android 개발 공식언어로 발표했습니다.
Kotlin은 객체지향프로그래밍과 함수적 기능을 고유한 플랫폼에 결합한 오픈소스 프로그래밍 언어입니다.

This is a strongly statically typed general-purpose programming language that runs on JVM. In 2017, Google announced Kotlin is an official language for android development. Kotlin is an open source programming language that combines object-oriented programming and functional features into a unique platform.

Kotlin은 개발자를 더 행복하게 만드는 현대적 프로그래밍언어입니다.
Kotlin은 사용이 쉽기 때문에 즉시 강력한 애플리케이션을 만들 수 있습니다.

Kotlin is a modern programming language that makes developers happier. Kotlin is easy to pick up, so you can create powerful applications immediately.

 

현재 Kotlin은 주로 JVM(Java Virtual Machine)을 대상으로 하지만 JavaScript로도 컴파일됩니다.
Kotlin은 Java, C#, JavaScript, Scala, Groovy 등 다른 인기있는 프로그래밍언어의 영향을 받습니다.
Kotlin 구문은 Java 프로그래밍언어와 정확히 유사하지 않을 수 있지만, 내부적으로 Kotlin은 기존 Java 클래스 라이브러리에 의존하여 프로그래머에게 멋진 결과를 제공합니다.
Kotlin은 전 세계 개발자에게 상호운용성, 코드안전성, 명확성을 제공합니다.

Currently, Kotlin mainly targets the Java Virtual Machine (JVM), but also compiles to JavaScript. Kotlin is influenced by other popular programming languages such as Java, C#, JavaScript, Scala and Groovy. The syntax of Kotlin may not be exactly similar to Java Programming Language, however, internally Kotlin is reliant on the existing Java Class library to produce wonderful results for the programmers. Kotlin provides interoperability, code safety, and clarity to the developers around the world.

왜 코틀린인가? Why Kotlin?

Kotlin은 모든 수준의 프로그래머 사이에서 높은 인기를 얻고 있으며 다음 용도로 사용됩니다.

Kotlin is getting high popularity among all level of programmers and it is used for:

크로스-플랫폼 모바일 애플리케이션.Cross-platform Mobile applications.
안드로이드 애플리케이션 개발. Android Application Development.
웹애플리케이션 개발 Web Application Development
서버측 애플리케이션 Server Side Applications
데스크탑 애플리케이션 개발 Desktop Application Development
데이터과학 기반 애플리케이션 Data science based applications

Kotlin은 다양한 플랫폼(Windows, Mac, Linux, Raspberry Pi 등)에서 작동하며 Java와 100% 호환.

Kotlin works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) and it's 100% compatible with Java.

Kotlin은 Google, Netflix, Slack, Uber 등 많은 대기업에서 Android기반 애플리케이션을 개발에 사용.

Kotlin is used by many large companies like Google, Netflix, Slack, Uber etc to develop their Android based applications.

가장 중요한 것은 특히 Android 개발 분야에서 Kotlin 개발자를 적극적으로 찾는 회사가 많다는 것입니다.

The most importantly, there are many companies actively looking for Kotlin developers, especially in the Android development space.

코틀린 버전? Kotlin Version?

이 튜토리얼을 작성하는 2022년 4월 19일 현재 최신Kotlin 릴리스 버전은 1.6.**입니다.

At the time of writing this tutorial on Aug 3, 2021, The current Kotlin released version is 1.5.21

What's new in Kotlin 1.8.0
Kotlin 1.8.0의 새로운 기능

Released: 28 December 2022

Kotlin 1.8.0 릴리스가 출시되었으며 다음은 주요 주요 내용 중 일부입니다.
The Kotlin 1.8.0 release is out and here are some of its biggest highlights:




.

       Compatibility with Gradle 7.3 Gradle 7.3과의 호환성

 

코틀린의 장점 Kotlin Advantages

다음은 애플리케이션 개발에 Kotlin을 사용할 때의 몇 가지 이점입니다.

Following are some of the advantages of using Kotlin for your application development.

1. 쉬운 언어 Easy Language

Kotlin은 객체지향 및 함수적 구조를 지원하며 배우기 매우 쉽습니다.

구문은 Java와 거의 유사하므로 모든 Java 프로그래머는 Kotlin 구문을 기억하기가 매우 쉽습니다.

Kotlin supports object-oriented and functional constructs and very easy to learn. The syntax is pretty much similar to Java, hence for any Java programmer it is very easy to remember any Kotlin Syntax.

2. 매우 간결 Very Concise

Kotlin은 JVM(Java Virtual Machine)을 기반으로 하며 함수적 언어입니다.

따라서 다른 프로그래밍언어에서 사용되는 많은 상용구 boiler plate 코드를 줄입니다.

Kotlin is based on Java Virtual Machine (JVM) and it is a functional language. Thus, it reduce lots of boiler plate code used in other programming languages.

3. 런타임 및 성능 Runtime and Performance

Kotlin은 모든 애플리케이션에 더 나은 성능과 작은 런타임을 제공합니다.

Kotlin gives a better performance and small runtime for any application.

4. 상호운용성 Interoperability

Kotlin은 덜 복잡한 방식으로 상호운용 가능한 애플리케이션을 구축할 수 있을 만큼 충분히 성숙했습니다.

Kotlin is mature enough to build an interoperable application in a less complex manner.

5. Brand New

Kotlin은 개발자에게 새로운 시작을 제공하는 완전히 새로운 언어.

JVM을 통해 개발되었지만 Java를 대체하지는 않음.

Kotlin은 Android 애플리케이션 개발의 첫 번째 공식 언어로 승인.

Kotlin은 Kotlin = Java + 추가 업데이트된 새 기능으로 정의할 수도 있습니다.

Kotlin is a brand new language that gives developers a fresh start. It is not a replacement of Java, though it is developed over JVM. Kotlin has been accepted as the first official language of Android Application Development. Kotlin can also be defined as - Kotlin = Java + Extra updated new features.

코틀린 단점 Kotlin Drawbacks

다음은 Kotlin 사용의 몇 가지 단점입니다.

Following are some of the disadvantages of using Kotlin.

1. 네임스페이스 선언 Namespace declaration

Kotlin을 사용하면 개발자가 최상위 수준에서 함수를 선언할 수 있습니다.
그러나 애플리케이션의 여러 위치에서 동일한 함수가 선언될 때마다 어떤 함수가 호출되는지 이해하기 어렵습니다.

Kotlin allows developers to declare the functions at the top level. However, whenever the same function is declared in many places of your application, then it is hard to understand which function is being called.

2. 정적 선언 없음 No Static Declaration

Kotlin에는 Java와 같은 일반적 정적 처리 수정자가 없으므로 기존 Java 개발자에게 문제가 발생할 수 있슴.

Kotlin does not have usual static handling modifier like Java, which can cause some problem to the conventional Java developer.

코틀린 채용정보 Kotlin Jobs

Kotlin은 수요가 매우 높으며 모든 주요 회사는 웹 및 모바일 애플리케이션을 개발하기 위해 Kotlin으로 이동하고 있습니다.
Kotlin 개발자의 평균 연봉은 약 $130,000입니다.
위치에 따라 다를 수 있지만. Kotlin을 사용하는 훌륭한 회사는 다음과 같습니다.

Kotlin is very high in demand and all major companies are moving towards Kotlin to develop their web and mobile applications.

Average annual salary for a Kotlin developer is around $130,000. Though it can vary depending on the location. Following are the great companies who are using Kotlin:

Google

Amazon

Netflix

Pinterest

Uber

Trello

Coursera

Basecamp

Corda

JetBrains

Many more...

따라서 이러한 주요 회사의 다음 잠재적 직원이 될 수 있습니다.

Kotlin을 기반으로 하는 기술 면접 및 인증 시험을 준비하는 데 도움이 되는 Kotlin용 학습 자료를 개발했습니다.

따라서 언제 어디서나 자신 속도에 맞춰 간단하고 효과적 튜토리얼을 사용하여 Kotlin 학습을 시작하세요.

So, you could be the next potential employee for any of these major companies. We have develop a great learning material for Kotlin which will help you to prepare for the technical interviews and certification exams based on Kotlin. So, start learning Kotlin using our simple and effective tutorial anywhere and anytime absolutely at your pace.

코틀린 온라인 컴파일러 Kotlin Online Compiler

브라우저에서 직접 코드를 편집하고 실행할 수 있도록 도와주는 Kotlin Online Compiler를 제공합니다.

아이콘 실행 버튼을 클릭하여 다음 Kotlin 코드를 실행하여 기존의 "Hello, World!"를 인쇄해 봅니다.

We have provided Kotlin Online Compiler which helps you to Edit and Execute the code directly from your browser. Try to click the icon

to run the following Kotlin code to print conventional "Hello, World!".

 

What's new in Kotlin 1.8.0 | Kotlin

 

kotlinlang.org

 

What's new in Kotlin 1.8.0 | Kotlin

 

kotlinlang.org

 

What's new in Kotlin 1.8.0 | Kotlin

 

kotlinlang.org

 

What's new in Kotlin 1.8.0 | Kotlin

 

kotlinlang.org

 

What's new in Kotlin 1.8.0 | Kotlin

 

kotlinlang.org

string 변수의 값을 변경하고 다시 실행하여 결과를 확인하십시오.

Try to change the value of string variable and run it again to verify the result.

fun main() {

var string: String = "Hello, World!" //변수를 정의

println("$string")

}

https://amzn.to/3jRQT3H

This Kotlin tutorial helps you prepare for technical interviews and certification exams. We have provided various quizzes and assignments to check your learning level. Given quizzes have multiple choice type of questions and their answers with short explanation.

Following is a sample quiz, try to attempt any of the given answers:

Q 1 - Kotlin has been developed based on the following programming language?
A - Python
B - Scala
C - Java
D - None of the Above
 

Audience of Kotlin

이 튜토리얼은 코틀린 프로그래밍 언어의 기초를 이해할 수 있도록 초보자를 위해 준비되었습니다.

이 튜토리얼을 완료하면 Kotlin에 대해 어느 정도 수준의 전문성을 갖추게 되며 여기에서 다음 단계로 나아갈 수 있습니다.

This tutorial has been prepared for the beginners to help them understand the basics of Kotlin programming language. After completing this tutorial, you will find yourself at a moderate level of expertise in Kotlin, from where you can take yourself to the next levels.

Prerequisites to Learn Kotlin

이 튜토리얼을 진행하기 전에 Java 프로그래밍 언어에 대한 기본적 이해가 있어야 합니다.

초보자 튜토리얼이지만 독자가 모든 프로그래밍 환경에 대한 적절한 노출과 변수, 명령, 구문 등과 같은 기본 개념에 대한 지식이 있다고 가정합니다.

코틀린 프로그래밍을 계속 진행하기 전에, Java 프로그래밍언어에 대한 기본지식을 습득하면 좋습니다.

Before proceeding with this tutorial you should have a basic understanding of Java programming language. Although it is a beginners tutorial, we assume that the readers have a reasonable exposure to any programming environment and knowledge of basic concepts such as variables, commands, syntax, etc. We strongly recommend that you gain some basic knowledge of Java programming language before proceeding with Kotlin programming.

코틀린이란? What is Kotlin?

Kotlin은 Java, JavaScript, Python 등과 같은 새로운 오픈소스 프로그래밍언어입니다.

함수적 부분과 기술적 부분을 한 곳에서 결합하는 높은 수준의 강력한 정적 타입 언어입니다.

현재 Kotlin은 주로 JVM(Java Virtual Machine)을 대상으로 하지만 JavaScript로도 컴파일됩니다.

Kotlin is a new open source programming language like Java, JavaScript, Python etc. It is a high level strongly statically typed language that combines functional and technical part in a same place. Currently, Kotlin mainly targets the Java Virtual Machine (JVM), but also compiles to JavaScript.

Kotlin은 Java, C#, JavaScript, Scala 및 Groovy와 같은 다른 인기 있는 프로그래밍 언어의 영향을 받습니다.

Kotlin의 구문은 Java 프로그래밍언어와 정확히 유사하지 않을 수 있지만 내부적으로 Kotlin은 기존 Java 클래스 라이브러리에 의존하여 프로그래머에게 멋진 결과를 제공합니다.

Kotlin은 전 세계 개발자에게 상호운용성, 코드안전성, 명확성을 제공합니다.

Kotlin is influenced by other popular programming languages such as Java, C#, JavaScript, Scala and Groovy. The syntax of Kotlin may not be exactly similar to Java Programming Language, however, internally Kotlin is reliant on the existing Java Class library to produce wonderful results for the programmers. Kotlin provides interoperability, code safety, and clarity to the developers around the world.

Kotlin은 2016년 JetBrains에 의해 개발 및 출시되었습니다.

Kotlin은 무료이며 앞으로도 계속 무료입니다. Apache 2.0 라이선스로 개발되었으며 GitHub에서 소스 코드를 사용할 수 있습니다.

Kotlin was developed and released by JetBrains in 2016. Kotlin is free, has been free and will remain free. It is developed under the Apache 2.0 license and the source code is available on GitHub

왜 코틀린인가?

Kotlin은 모든 수준의 프로그래머 사이에서 높은 인기를 얻고 있으며 다음 용도로 사용됩니다.

크로스 플랫폼 모바일 애플리케이션.

안드로이드 애플리케이션 개발.

웹 애플리케이션 개발

서버 측 애플리케이션

데스크탑 애플리케이션 개발

데이터 과학 기반 애플리케이션

Kotlin은 다양한 플랫폼(Windows, Mac, Linux, Raspberry Pi 등)에서 작동하며 Java와 100% 호환됩니다.

Kotlin은 Google, Netflix, Slack, Uber 등과 같은 많은 대기업에서 Android 기반 애플리케이션을 개발하는 데 사용합니다.

가장 중요한 것은 특히 Android 개발 분야에서 Kotlin 개발자를 적극적으로 찾는 회사가 많다는 것입니다.

코틀린 버전?

이 튜토리얼을 작성하는 2021년 8월 3일 현재 Kotlin 릴리스 버전은 1.5.21입니다.

코틀린의 장점

다음은 애플리케이션 개발에 Kotlin을 사용할 때의 몇 가지 이점입니다.

1. 쉬운 언어 - Kotlin은 객체 지향 및 기능적 구조를 지원하며 배우기 매우 쉽습니다. 구문은 Java와 거의 유사하므로 모든 Java 프로그래머는 Kotlin 구문을 기억하기가 매우 쉽습니다.

2. 매우 간결함 - Kotlin은 JVM(Java Virtual Machine)을 기반으로 하며 기능적 언어입니다. 따라서 다른 프로그래밍 언어에서 사용되는 많은 상용구 코드를 줄입니다.

3. 런타임 및 성능 - Kotlin은 모든 애플리케이션에 더 나은 성능과 작은 런타임을 제공합니다.

4. 상호 운용성 - Kotlin은 덜 복잡한 방식으로 상호 운용 가능한 애플리케이션을 구축할 수 있을 만큼 충분히 성숙했습니다.

5. Brand New - Kotlin은 개발자에게 새로운 시작을 제공하는 완전히 새로운 언어입니다. JVM을 통해 개발되었지만 Java를 대체하지는 않습니다. Kotlin은 Android 애플리케이션 개발의 첫 번째 공식 언어로 승인되었습니다. Kotlin은 Kotlin = Java + 추가 업데이트된 새 기능으로 정의할 수도 있습니다.

코틀린의 단점

다음은 Kotlin 사용의 몇 가지 단점입니다.

1. 네임스페이스 선언 - Kotlin을 사용하면 개발자가 최상위 수준에서 함수를 선언할 수 있습니다. 그러나 애플리케이션의 여러 위치에서 동일한 함수가 선언될 때마다 어떤 함수가 호출되는지 이해하기 어렵습니다.

2. 정적 선언 없음 - Kotlin에는 Java와 같은 일반적인 정적 처리 수정자가 없으므로 기존 Java 개발자에게 문제가 발생할 수 있습니다.

퀴즈 시간(면접 및 시험 준비)

Q 1 - Kotlin은 다음 프로그래밍 언어를 기반으로 개발되었습니까?

A - 파이썬

B - 스칼라

C - 자바

D - 위 항목 없음

Q 2 - Kotlin은 객체 지향 및 기능 구성을 지원합니까?

진실

B - 거짓

Q 3 - 다음 소프트웨어 중 Kotlin을 사용하여 개발할 수 있는 소프트웨어는 무엇입니까?

A - 모바일 애플리케이션

B - 클라이언트 측 애플리케이션

C - 서버 측 애플리케이션

D - 위의 모든 것

Q 4 - Kotlin은 100% 무료인가요?

진실

B - 거짓

C - 확실하지 않음

Why Kotlin?

Kotlin is getting high popularity among all level of programmers and it is used for:

Cross-platform Mobile applications.

Android Application Development.

Web Application Development

Server Side Applications

Desktop Application Development

Data science based applications

Kotlin works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.) and it's 100% compatible with Java.

Kotlin is used by many large companies like Google, Netflix, Slack, Uber etc to develop their Android based applications.

The most importantly, there are many companies actively looking for Kotlin developers, especially in the Android development space.

Kotlin Version?

At the time of writing this tutorial on Aug 3, 2021, The current Kotlin released version is 1.5.21

Kotlin Advantages

Following are some of the advantages of using Kotlin for your application development.

1. Easy Language − Kotlin supports object-oriented and functional constructs and very easy to learn. The syntax is pretty much similar to Java, hence for any Java programmer it is very easy to remember any Kotlin Syntax.

2. Very Concise − Kotlin is based on Java Virtual Machine (JVM) and it is a functional language. Thus, it reduce lots of boiler plate code used in other programming languages.

3. Runtime and Performance − Kotlin gives a better performance and small runtime for any application.

4. Interoperability − Kotlin is mature enough to build an interoperable application in a less complex manner.

5. Brand New − Kotlin is a brand new language that gives developers a fresh start. It is not a replacement of Java, though it is developed over JVM. Kotlin has been accepted as the first official language of Android Application Development. Kotlin can also be defined as - Kotlin = Java + Extra updated new features.

Kotlin Drawbacks

Following are some of the disadvantages of using Kotlin.

1. Namespace declaration − Kotlin allows developers to declare the functions at the top level. However, whenever the same function is declared in many places of your application, then it is hard to understand which function is being called.

2. No Static Declaration − Kotlin does not have usual static handling modifier like Java, which can cause some problem to the conventional Java developer.

Quiz Time (Interview & Exams Preparation)

Q 1 - Kotlin has been developed based on the following programming language?
A - Python
B - Scala
C - Java
D - None of the Above
Q 2 - Kotlin supports object-oriented and functional constructs?
A - True
B - False
Q 3 - Kotlin can be used to develop which of the following softwares?
A - Mobile Applications
B - Client Side Applications
C - Server Side Applications
D - All of the Above
Q 4 - Kotlin is 100% free?
A - True
B - False
C - Not Sure

Architecture

Kotlin은 프로그래밍 언어이며 메모리를 할당하고 최종 사용자에게 양질의 출력을 제공하는 자체 아키텍처를 가지고 있습니다.

다음은 Kotlin 컴파일러가 다르게 작동하는 다양한 시나리오입니다.

Kotlin을 JVM에서 실행할 수 있는 바이트코드로 컴파일합니다.

이 바이트코드는 Java .class 파일에 의해 생성된 바이트 코드와 정확히 동일합니다.

Kotlin이 JavaScript를 대상으로 할 때마다 Kotlin 컴파일러는 .kt 파일을 ES5.1로 변환하고 JavaScript용 호환 코드를 생성합니다.

Kotlin 컴파일러는 LLVM을 통해 플랫폼기반 호환코드를 생성할 수 있습니다.

Kotlin 다중 플랫폼 모바일(KMM)은 Android와 iOS 간에 공유되는 코드로 다중 플랫폼 모바일 애플리케이션을 만드는 데 사용됩니다.

Kotlin is a programming language and has its own architecture to allocate memory and produce a quality output to the end user.

Following are the different scenarios where Kotlin compiler will work differently.

Compile Kotlin into bytecode which can run on JVM. This bytecode is exactly equal to the byte code generated by the Java .class file.

Whenever Kotlin targets JavaScript, the Kotlin compiler converts the .kt file into ES5.1 and generates a compatible code for JavaScript.

Kotlin compiler is capable of creating platform basis compatible codes via LLVM.

Kotlin Multiplatform Mobile (KMM) is used to create multiplatform mobile applications with code shared between Android and iOS.

Whenever two byte coded files ( Two different programs from Kotlin and Java) runs on the JVM, they can communicate with each other and this is how an interoperable feature is established in Kotlin for Java.

Kotlin Native

Kotlin/Native is a technology for compiling Kotlin code to native binaries, which can run without a virtual machine. Kotlin/Native supports the following platforms:

macOS

iOS, tvOS, watchOS

Linux

Windows (MinGW)

Android NDK

Many more...

Kotlin/Native is primarily designed to allow compilation for platforms where virtual machines are not desirable or possible, for example, embedded devices or iOS.

It is easy to include a compiled Kotlin code into existing projects written in C, C++, Swift, Objective-C, and other languages.

Quiz Time (Interview & Exams Preparation)

Q 1 - Kotlin code can be compiled into Javascript code?
A - True
B - False
Q 2 - Compiled Kotlin code can be included in which of the following language code?
A - Objective-C
B - C/C++
C - Swift
D - All the above

 


반응형

댓글