Skip to main content

Posts

Showing posts with the label Kotlin

KotlinBytes: The Spread(*) Operator

I have posted a similar article on a different style on linked-in which is a 2 min read, and it tries to cut to the point without any jibber jabbers ;) feel free to check it out ( here is the link ). Since you have taken the long path with interest to the full story lets dive in, The current item of the sprint at work was offline-implementation for the feature i am already working on, so i had an implementation already for bulk get call for the list screen, and i wanted is same exact implementation but this time for the detail screen so a single get call, Like most people i started to duplicate the function and modify the param and tweek the implementation to match the new requirement but then i kinda realised that i will have to modify this later as i  move further, so i kinda looked around the internet and couldn't find any right solution except passing it as a list with only one item, this felt really wrong.  I tried asking ChatGPT and she gave me complicated solutions whic...