RaisedByTheInternet

Results 4 comments of RaisedByTheInternet
trafficstars

Since inline classes can't have `init` blocks, how can we do validation? For example, suppose I create a Username class: inline class Username(private val value: String) And I want to...

@zarechenskiy Hmm, if we can't do validation then this feature seems very limited. For example, we have this UInt inline class: inline class UInt(private val value: Int) If anyone can...

@zarechenskiy It sounds like I may have misunderstood, as I didn't realise that `UInt(-1)` could be represented as the maximum value. But how will that work? Something like `invoke()` inside...

@fvasco: I see. Thanks for the examples. I guess one problem with the UInt example is that we need to pass a Long, and so something like this won't work:...