Channels are mysterious for many Kotlin developers. While they power a lot of the higher-level coroutine APIs, there are also times when it makes sense to use them directly!
Got a callback-based library in your Kotlin code? Don't litter your main project code with them! Instead, just create a thin adapter layer that converts them to coroutines. I'll show you how.
Kotlin 2.4 finally introduces Collection Literals, so that we can declare our collections with brackets instead of manually calling functions. And when we put them together with the new name-based destructuring feature, we end up with a particularly cool effect.
Poznaj funkcje w Kotlinie w łatwy i zabawny sposób, z mnóstwem przykładów i ilustracji! Funkcje jako wyrażenia, funkcje z ciałem w bloku, argumenty nazwane, argumenty domyślne i wiele więcej.
A więc chciałbyś zostać programistą Kotlina? Dobrze trafiłeś! Twoja przygoda zaczyna się tu, w Rozdziale 1, z którego dowiesz się wszystkiego o zmiennych, wyrażeniach i typach.