kotlin rose tined glasses: typo

This commit is contained in:
Wouter Groeneveld 2021-08-19 11:58:56 +02:00
parent 68518d0980
commit 35e24b9263
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ My Kotlin rose-tinted glasses broke.
I am not saying I developed a strong disliking for the language: rather, I'm starting to miss Go's simplicity. But for Android-based app development, Kotlin is the recommended way to go, so I plodded on. Perhaps more cautiously. As you compile your Kotlin code, you generate JVM-compatible bytecode. The problem is, sometimes, that generated code is not what you want. Some situations even reminded me of troublesome times where we once thought relying on Spring Boot and scaffolding was a great idea. Code generation is always asking for trouble, especially if that duplication hurts your eyes and you'd like to refactor it out.
A few simple examples to demonstrate the issue. Suppose I want to write a static method on a class. That's impossible: Kotlin does not know `static`. The JVM does, however, and thus, translations are in order, and you have to learn to new syntax:
A few simple examples to demonstrate the issue. Suppose I want to write a static method on a class. That's impossible: Kotlin does not know `static`. The JVM does, however, and thus, translations are in order, and you have to learn the new syntax, which basically does the same thing:
```kt
data class Kitten(val name: String, val age: Double) {