Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0版本update更新 #3207

Open
little-alei opened this issue Sep 7, 2024 · 0 comments
Open

5.0版本update更新 #3207

little-alei opened this issue Sep 7, 2024 · 0 comments

Comments

@little-alei
Copy link

ATTENTION: DO NOT USE THIS FIELD TO ASK SUPPORT QUESTIONS. USE THE PLATFORM CHANNELS FOR THIS. THIS SPACE IS DEDICATED ONLY FOR FEATURE REQUESTS

Is your feature request related to a problem? Please describe.
中文: 当使用5.0版本的get,自定义class对象更新,使用update必须返回该对象,我大致猜测是为了更灵活的设计,比如可以返回copywith后的对象,更新一些final的属性。但我认为大多数时候都不会返回新的对象,我认为返回值应该是可选的,具备返回值更替换对象,不具备就是更新对象属性。或者这样设计影响效率的话,可以再增加一个方法,而不是再update上完成

English: When using get in version 5.0, for custom class object updates, when using update, the object must be returned. I roughly guess that this is for a more flexible design. For example, an object after copywith can be returned to update some final attributes. But I think that most of the time a new object will not be returned. I think the return value should be optional. If there is a return value, the object can be replaced. If there is no return value, the object attributes are updated. Or if this design affects efficiency, a new method can be added instead of completing it on update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant