Jake Wharton

Results 1650 comments of Jake Wharton

I don't think that's a use case we care about optimizing for. For the first style, in the exceedingly rare case that you want to remove only a single callback...

This looks good. I never knew this class existed. I need to double check it once I'm not on a phone.

Something like this might be feasible once we have inline classes in Kotlin 1.3 and can make this zero-overhead. I'd rather see a lint check for now guard against types...

The forthcoming inline classes prevents the need for the wrapper class to be allocated around a Bundle and allows all the functions to be inline. This means that it adds...

We might have to leave it out until https://youtrack.jetbrains.com/issue/KT-11968 is fixed. I'll ask JetBrains about it at our weekly meeting next week.

Delegates are an expensive hammer to use for this. I don't think we've decided whether their use is appropriate for simple things like this.

A `lateinit` property is an order of magnitude less expensive. I have no idea what "same extra on different scopes" means.

These are resources. Why should we put them on context?

Then I think we should either deprecate that method or add these to Context in the framework.

But there's two useful variants of retrieving dimensions and you've (arguably) included the less-useful variant despite it's more appealing name.