Hopp til hovedinnhold

Innhold om Kotlin

Totalt 53 innlegg

Side 2 av 4

Kotlin metaprogramming with kotlinpoet

Kotlin
Artikkel (3 min)
Fra Nicklas Utgaard
14.12.2020

Wouldn't it be sweet if you could automate writing code. Well, that's what we're taking a look at today. Metaprogramming, code generation, or in short; writing kotlin code that generates even more kotlin code 🤯.

Operator Overloading

Kotlin
Artikkel (3 min)
Fra Eivind Reime
13.12.2020

Have you ever tried to use the compare operations on two instances of your self-made data class in Kotlin just to realize it is not possible? By employing operator overloading, you are actually able to do so!

MockK Library

Kotlin
Artikkel (6 min)
Fra Kristoffer Olsen
12.12.2020

MockK is a mocking library for Kotlin, written in Kotlin. Because of this, it has extensive support for Kotlin language features such as extension functions and companion objects.

Spek Framework

Kotlin
Artikkel (2 min)
Fra Tia Firing
11.12.2020

Most of us use JUnit as our go-to testing framework, often without really considering the alternatives. Are you ready to try something new? Why not give Spek Framework a shot?

Bring your generic function type parameters back to life with the reified keyword

Kotlin
Artikkel (5 min)
Fra Sondre Larsen Ovrid
10.12.2020

Reification. Like many other concepts, it can be applied in a number of different ways and it might carry slightly different meanings depending on the context. According to this definition, reification is simply the act of representing something abstract in a physical way. In Java, on the other hand, the term is used in the context of which types that are available to us at runtime. Additionally, in Kotlin we actually have a modifier keyword built into the language, namely reified. In this article we'll take a closer look at how reification and type erasure are connected, and more specifically how we can combine inline functions and reified type parameters in Kotlin to achieve things in generic functions that we normally would not be able to.

Serialization: New player has joined

Kotlin
Artikkel (4 min)
Fra Nicklas Utgaard
09.12.2020

With the release of Kotlin 1.4 we got a new treat; kotlinx.serialization. A new tool to help us with the cumbersome task of converting our objects to and from Json.

Gson and Kotlin: The nightmare before christmas!

Kotlin
Artikkel (3 min)
Fra Tia Firing
08.12.2020

Does it really matter which serialization library you choose for your application? They're all pretty much the same, right? Right... It's story time!

Type Classes

Kotlin
Artikkel (5 min)
Fra Matias Vinjevoll
07.12.2020

String templates

Kotlin
Artikkel (4 min)
Fra Jørn Ola Birkeland
06.12.2020

Using the Bytecode Viewer and Decompiler tools in IntelliJ to lift the veil of Kotlin's magic

Kotlin
Artikkel (5 min)
Fra Sondre Larsen Ovrid
05.12.2020

IDE's commonly include a lot of useful tools that can make our lives as developers easier. Some are pure productivity tools to speed up our development, while others may actually help our understanding of the code we are implementing. The toolset included with the IntelliJ IDEA IDE is no exception. In this article we will take a look at the Bytecode Viewer and Java Bytecode Decompiler integrated tools in IntelliJ, and how they may help us getting a better understanding of how our Kotlin code is represented on the JVM, and how it could potentially look in Java.

Destructuring

Kotlin
Artikkel (3 min)
Fra Matias Vinjevoll
04.12.2020

Why and When: let, apply, run, also

Kotlin
Artikkel (8 min)
Fra Vegard Veiset
03.12.2020

The Kotlin standard library has a lot of amazing stuff and today we will take a closer look at what let, run, also and apply is and when to use them.

Kotlin changelog

Kotlin
Artikkel (4 min)
Fra Nicklas Utgaard
02.12.2020

The year 2020 has certainly been a special one, but that hasn't stopped Jetbrains from continuing its work on the Kotlin language and its ecosystem. In March we got the 1.3.70 version, an incremental release, which included some new functions and classes in the standard library. And after the summer break we got the all new 1.4.0 version, a feature release, which came with some really sought after changes to the language and even more changes to the standard library.

Immutability

Kotlin
Artikkel (4 min)
Fra Vegard Veiset
01.12.2020

Welcome to the second year of the Bekk’s Kotlin advent calendar. If you followed us last year welcome back, and if you’re new this year you’re in for a treat. Each day leading up to Christmas Eve there will be a new post about Kotlin features, tooling, the Kotlin ecosystem and more!

Happy holidays and thanks for this year!

Kotlin
Artikkel (2 min)
Fra Vegard Veiset
24.12.2019

It's the 24th of December and a visit from Santa is right around the corner. The reindeer are eager and his sleigh is ready. He has determined who is naughty and who is nice.