Kotlin For Beginners : Part 1
The What and Why ?

Kotlin is a statically typed programming language. This means the type of every expression in a program is known at compile time, and the compiler can validate that the methods and fields you’re trying to access exist on the objects you’re using.
Benefits of static typing:
- Performance — Calling methods is faster because there’s no need to figure out at runtime which method needs to be called.
- Reliability — The compiler verifies the correctness of the program, so there are fewer chances for crashes at runtime.
- Maintainability — Working with unfamiliar code is easier because you can see what kind of objects the code is working with.
- Tool support — Static typing enables reliable refactorings, precise code completion, and other IDE features.
Functional Programming
- First-class functions — You work with functions (pieces of behavior) as values. You can store them in variables, pass them as parameters, or return them from other functions.
- Immutability — You work with immutable objects, which guarantees that their state can’t change after their creation.
- No side effects — You use pure functions that return the same result given the same inputs and don’t modify the state of other objects or interact with the outside world.
Kotlin Functional Features
- Functional types, allowing functions to receive other functions as parameters or return other functions.
- Lambda expressions, letting you pass around blocks of code with minimum boilerplate Data classes, providing a concise syntax for creating immutable value objects
- A rich set of APIs in the standard library for working with objects and collections in the functional style
Kotlin is pragmatic, safe, concise, and interoperable, meaning it focuses on using proven solutions for common tasks, preventing common errors such as `NullPointerException`s, supporting compact and easy-to-read code, and unrestricted integration with Java.
Hello World!
fun main(args: Array<String>){ println(“Hello, world!”) }