Hi everyone! My name is Mikhail Polivakha, and I am the technical lead of the open-source project Axelix .
Imagine you’re reviewing a pull request and come across this transfer handler.
fun execute ( transfer : Transfer ) { val ( debit , credit , amount ) = transfer ledger . move ( from = debit , to = credit , amount = amount ) }
Enter fullscreen mode
Exit fullscreen mode
Which account does the money come out of? Judging by the argument names, the one called debit . Now let’s open the DTO.
data class Transfer ( val credit : Long , val debit : Long , val amount : Long )
Enter fullscreen mode
Exit fullscreen mode
Well, there goes the money. Ask this handler to transfer funds from account 10 to account 20, and it’ll debit 20 and credit 10. The named arguments in the call to move just make the code look that much more convincing.
That’s where I want to start with Kotlin 2.5.…