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
Functions like buildList were frequently used at the beginning of Kotlin, but it seems like nowadays it is much better to use fake constructors instead of top-level functions. So, I suggest adding a Payload{ } builder and deprecate buildPayload without changing its desgin.
Motivation
The only motivation for this change is discoverability. If you want to create Payload, you start typing Payload without looking into documentation for function. It is not possible to do that for List in the standard library because it would be ambiguous now, but for Payload it seems to be a good solution.
The text was updated successfully, but these errors were encountered:
Functions like
buildList
were frequently used at the beginning of Kotlin, but it seems like nowadays it is much better to use fake constructors instead of top-level functions. So, I suggest adding aPayload{ }
builder and deprecatebuildPayload
without changing its desgin.Motivation
The only motivation for this change is discoverability. If you want to create Payload, you start typing Payload without looking into documentation for function. It is not possible to do that for
List
in the standard library because it would be ambiguous now, but forPayload
it seems to be a good solution.The text was updated successfully, but these errors were encountered: