Local Scopes In Laravel
February 28, 2019Reusable Components And RxJS Observables In Ionic-Angular
April 8, 2019Benefits of using Kotlin
Original Presentation: Android - A quick Kotlin Eksperience
1.No Semi-Colon
2.Default Values
3.Extension Functions
4.Data Classes
5.Parcelize
6.Unit Functions
7.Null Operations
No Semicolons
This is probably the thing smallest things but has a huge effect on readability of code. A couple things to note is that there’s no new keyword and you don’t need to declare the type.
Default Values
Data Classes - Code
=
Kotlin data class benefits
1.The properties declared in the constructor: this technically is not exclusive to a data class, but it avoids all the boilerplate of getters and setters, in addition to the constructor
2.Provides the equals() & hashCode() functions
3.Provides a copy() method, very useful when we use immutable objects.
Parcelize - Code
=
The old implementation of Parcelize, required you to write a writeToParcelize class and create a new Creator class and was generally more work than it should have been. The more parameters you had in the Model Class the longer your code would inevitably become