Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Even as someone familiar with Kotlin, it's hard to decipher what this library is doing without syntax highlighting here. The author is using infix functions and custom extension functions on primitive types. Non-Kotlin-natives will scratch heads.


Oh no, I know how it's done, I'm just surprised by it. There are more straight forward ways of expressing the same thing without using infix functions and those extensions (e.g. `val price = USD(100)` or `val price = Money(100, 'USD')`).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: