Questions tagged [kotlin]
25 questions
3
votes
4 answers
Is there ever a reason in Kotlin to use threads over coroutines?
I have a good understanding of when coroutines in Kotlin are superior to threads. I know that coroutines are lightweight and are great for massive concurrency when, in contrast, spinning up lots of threads is costly in compute resources, memory…

J-bob
- 299
- 1
- 5
1
vote
0 answers
Using validate || throw
So, I recently added some validation logic to our controllers:
interface Validator {
fun validate(model: T): Boolean
}
Which is used in the controller like this:
validator.validate(request) || throw Exception()
During code review my…

Dennis Haarbrink
- 111
-1
votes
1 answer
What is the relationship between Java Library and Kotlin?
I wanted to learn Kotlin but after reading online most experts seem to agree that learning Java first would be a first step in the roadmap of learning Kotlin. Their argument based on the fact that Kotlin developers may use Java Library. However, I…

Ladan
- 1