National University of Computer and Emerging Sciences: Pimra Ahmad 21L-7238 Muhammad Ishaq 21L-7239

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

NATIONAL UNIVERSITY OF COMPUTER AND EMERGING SCIENCES

SUBMITTED TO: DR. AASIM ALI

SUBMITTED BY: PIMRA AHMAD

21L-7238

MUHAMMAD ISHAQ

21L-7239

REPORT:

THEORETICAL STUDY OF KOTLIN

COURSE:

THEORY OF PROGRAMMING LANGUAGES

DATE: DEC 27, 2021

0|Page
History and versions…………………………………………………………………………………………………………………………….2
Paradigms and Application Areas…………………………………………………………………………………………………………2
Multi-paradigm……………………………………………………………………………………………………………….…….………2
Memory Management and Typing Strategy…………………………………………………………………………………………2
Keywords and Reserved words…………………………………………………………………………………………………….………2
Hard Keywords………………………………………………………………………………………..…………………………….………2
Soft Keywords……………………………………………………………………………………………………………………………….2
Programming constructs……………………………………………………………………………………………………………………..2
Compilation and execution…………………………………………………………………………………………………..……………..3
Strengths and weaknesses…………………………………………………………………………………………………………………..3
Strengths of Kotlin……………………………………………………………………………………………………………………………….3
Increase productivity……………………………………………………………………………………………………………………..3
Simple to maintain…………………………………………………………………………………………………………………………3
Simple to grasp………………………………………………………………………………………………………………………………3
Weaknesses of Kotlin…………………………………………………………………………………………………………………………..3
Speed of Compilation…………………………………………………………………………………………………………………….3
Limited learning resources…………………………………………………………………………………………………………….3
Summary and conclusion…………………………………………………………………………………………………………………….3
References…………………………………………………………………………………………………………………………………………..3

1|Page
History and versions Hard Keywords
 Kotlin has 24 hard keywords that
The development of the Kotlin programming cannot be used as identifiers in any
language began in 2010, and the project was
launched in July 2011. The Kotlin programming circumstance.
language was invented and developed by Jet Brains,  The following is a list of difficult
the company behind IntelliJ IDEA, which is based in
Russia. Jet Brains established the Kotlin Foundation
to maintain the Kotlin programming language. The
Kotlin programming language was first introduced in
2016, and the most recent version is Kotlin 1.5.0. (1)

Paradigms and Application Areas (2)

Multi-paradigm: concurrent, imperative, object- keywords.


oriented, generic, functional, declarative, reflective,
block structured. Kotlin is the recommended
language for Android development because it allows
developers to produce code that is more concise, Soft Keywords
expressive, and secure used for:  Kotlin has 17 soft keywords, which act as
keywords in one context but can also be used
• Desktop app development and native app as identifiers in another.
development  A list of soft keywords is provided below.
• Web design and development
• Development of cross-platform mobile apps.
• Development on the server side.
• App development for data science.

Memory Management and Typing


Strategy

Similar to Java or Swift, Kotlin/Native provides an Programming constructs


automatic memory management method. To collect
cyclical garbage, the present system incorporates an Language constructs are elements of a
automated reference counter and a cycle collector. (3) program that are made up of one or more tokens that
are synthetically acceptable and follow the rules of
Keywords and Reserved words the programming language. (5)
 Datatypes
Keywords are predetermined, reserved words  Keywords
in the language that have a specific meaning; it is  Literals
generally not suggested to use them as identifiers.
 Method
However, there are several keywords in Kotlin that
can be used as identifiers in certain contexts. (4)  Operators
 Control Statements
Kotlin keywords:  Arrays
1. Hard keywords  Identifiers
2. Soft keywords
 Comments
 Class Libraries

2|Page
it's worth remembering that when it comes to clean
building, Java will always be superior.
Compilation and execution
Limited learning resources
Kotlin is a statically typed open-source The number of developers that are moving
programming language that generates code that runs to Kotlin is growing, however there is only a small
on the JVM, according to its definition. It must developer community to learn from or solve
compile to Java byte-code in order to run on the JVM. problems with in the development process.
Cradle, Maven, Ant, and Kobalt are the main build
tools for the JVM. There are also several build tools
for JavaScript on the client side. Kotlin generates
Summary and conclusion
Java-compatible bytecode when targeting the JVM.
When targeting JavaScript, Kotlin transpires to ES5.1  Jet Brains proposed Kotlin in 2010 as a multi-
and produces code that is compliant with AMD and platform programming language under the
CommonJS module systems. Kotlin generates Apache 2.0 license.
platform-specific code when targeting native. (6)  Kotlin's first version, v1.0, was released in 2016.
 Programs written in Kotlin do not require
Strengths and weaknesses (7) semicolons. This simplifies and improves the
readability of the code.
 Kotlin, like other programming languages,
Strengths of Kotlin contains a built-in collection of data types such as
int, boolean, char, double, and so on.
Increase productivity  Kotlin is a null-safe language that helps to
Kotlin is a Java-inspired programming eliminate the null pointer error or null reference
language. Java's annoyances and obsolescence are from code, which is dubbed "A Billion Dollar
readily overcome with Kotlin. Kotlin is a concise and Mistake" for a reason.
dynamic programming language. Because it takes
relatively little time to write and deploy, Kotlin can References
greatly increase the productivity of a developer's
team.
 https://www.oreilly.com/library/view/kotlin-
for-enterprise/9781788997270/ea4ec584-db64-
Simple to maintain 4026-89a8-2086301eb9c5.xhtml
Many IDEs, including Android Studio and a
slew of additional SDK tools, support Kotlin. It can  https://www.linkedin.com/pulse/kotlin-multi-
also increase the developer's productivity because it paradigm-programming-language-fromgoogle-
can deal with the toolkits they're already utilizing. sunil-sharma
Reliable there are many programming languages
accessible, but Kotlin is one of the more advanced  https://kotlinlang.org/docs/native-faq.html
ones. In the year 2011, Kotlin made his big screen
debut.  https://beginnersbook.com/2017/12/kotlin-
keywords-identifiers/#:~:text=There%20are
Simple to grasp %20certain%20words%20in,called
Kotlin aspires to improve rather than replace %20reserved%20words%20or%20keywords
Java's features. Mobile developers who have worked
with Java may simply transition to Kotlin, and their  https://programmerbay.com/basic-language-
Java skills will remain relevant and useful in Kotlin. constructs-of-kotlin

 https://medium.com/@banmarkovic/process-
Weaknesses of Kotlin of-compiling-android-app-with-java-kotlin-
code-27edcfcce616
Speed of Compilation
When it comes to incremental builds, Kotlin  https://www.appsbee.com/blog/kotlin-
can be faster than Java in some circumstances. But advantages-disadvantages-facts-you-should-
know

3|Page
4|Page

You might also like