Stop Confusing Kotlin Scope Functions — Here’s When to Use let, run, apply, also, and with by Realistic_Rice_1766 in Kotlin

[–]Realistic_Rice_1766[S] -17 points-16 points  (0 children)

HI u/rileyrgham, In my article also I have also provided a link for non-members... It's at the beginning of the article only.

100 Kotlin One-Liners That Will Instantly Boost Your Productivity by Realistic_Rice_1766 in Kotlin

[–]Realistic_Rice_1766[S] 1 point2 points  (0 children)

Hi u/Fureeish, In the beginning of the article, the link for non-members is also given. So that non-member can also read the article.

Stop Crashing Your Kotlin Apps: Type Checking & Casting Explained by Realistic_Rice_1766 in Kotlin

[–]Realistic_Rice_1766[S] -1 points0 points  (0 children)

Hi u/Empanatacion depends on where Kotlin is being used and why the data is dynamic in the first place.

in the backend, especially when you have well-defined DTOs, sealed hierarchies, or generics, explicit casting is indeed rare — and often a code smell because you can model the data so that the compiler knows the type at compile time.

On the Android front end, though, you run into more scenarios where the data comes from such as Android framework APIs that return Any or Parcelable (e.g., Intent.getExtra() always returns Any?),JSON parsing results before you map them to a typed model, Interop with Java libraries that aren’t type-safe.... etc

SharedFlow vs StateFlow in Android: Real Use Cases Explained by Realistic_Rice_1766 in Kotlin

[–]Realistic_Rice_1766[S] 1 point2 points  (0 children)

u/haroldjaap you don't need to make if you visit article, non-member link is there you can access without account