You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.
If the methods don't return the last expression, they shouldn't be named withXXX IMHO.
doWithXXX or applyWithXXX would be less confusing in regards to the naming convention. The do variant may return Unit and the apply variant, the Canvas, following what apply from Kotlin stdlib does.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
with
from Kotlin stdlib returns value of its last expression, if any, and in other places of the Kotlin world,withXXX
methods do the same to follow this convention, yet in androidx they returnUnit
as seen there: https://android.github.io/android-ktx/core-ktx/androidx.graphics/android.graphics.-canvas/index.htmlThis should be fixed for the sake of consistency.
The text was updated successfully, but these errors were encountered: