Add some slides to the basic chapter

This commit is contained in:
p1ng0ut 2023-01-22 19:36:09 +01:00
parent d7b11c59db
commit 07d0b4945f
2 changed files with 62 additions and 10 deletions

View File

@ -26,14 +26,16 @@ reveal-md docs/index.md
## Kotlin Native Build
To compile this project natively, you have to go to the [current Kotlin release page](https://github.com/JetBrains/kotlin/releases) (currently
version 1.8.0) and download the distribution
that fits your operating system (you have to scroll down a bit). and download the
distribution that fits your operating system (you have to scroll down a bit).
To compile this project natively, you have to go to
the [current Kotlin release page](https://github.com/JetBrains/kotlin/releases) (currently
version 1.8.0) and download the distribution that fits your operating system (you have to scroll
down a bit).
```shell
kotlinc-native src/nativeMain/kotlin/Main.kt -o build/Main
```
[^1]: A tutorial for the installation can be found at
the [link](https://nodejs.org/en/download/package-manager/) above.

View File

@ -7,13 +7,63 @@ revealOptions:
transition: 'fade'
---
# Kotlin Course
# Kotlinkurs
---
<!--s-->
## Kotlin Language Basics
## Kotlin die Multiplattform-Sprache
Kotlin is a...
- JVM: Java-Code kann in Kotlin eingebunden werden und umgekehrt
- Android: Ausführung auf verschiedenen Geräten
- JS: Client-Anwendungen lauffähig im Browser
- Native: Kompilieren für jedes Betriebssystem (bspw. Windows, Linux, iOS und macOS)
- multiplatform programming language
-
<!--v-->
## Mehrere Programmierparadigmen möglich
- _imperative_ Programmierung,
- _objektorientierte_ Programmierung,
- _generische_ Programmierung,
- _funktionale_ Programmierung und mehr.
<!--v-->
## Etwas Geschichte
- Kotlin wurde **2011** erstmals vorgestellt und
- seit **2010** entwickelt
- **2016** wurde Version 1.0 veröffentlicht
- **2017** auf Google I/O erstklassiger Support angekündigt
<!--s-->
## Ein Beispielprogramm
Hello-World, wie üblich (siehe [Main.kt](../src/nativeMain/kotlin/Main.kt)):
```kotlin
fun main() {
println("Hello, Kotlin/Native!")
}
```
<!--v-->
## Grundlegende Begriffe (1/2)
- Ein **Programm** ist eine Folge von Anweisungen, die nacheinander ausgeführt werden.
- Eine **Anweisung** ist ein einzelner auszuführender Befehl (drucke den Text),
- Ein **Ausdruck** ist ein Codestück, das einen einzigen Wert ergibt (z. B. ist 2*2 ein Ausdruck)
<!--v-->
## Grundlegende Begriffe (2/2)
- Ein **Block** ist eine Gruppe von Anweisungen, in einem Paar geschweifter Klammern `{...}`
- Des Weiteren gibt es noch:
- **Schlüsselwörter** - Wort mit besonderer Bedeutung in der Programmiersprache
- **Bezeichner** - Wort um etwas zu identifizieren
- **Kommentare** - Text der beim Ausführen des Programms identifiziert wird
## Analyse Hello-World-Programm