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

Fix Json array clone #2249

Merged
merged 1 commit into from Jan 10, 2019
Merged

Fix Json array clone #2249

merged 1 commit into from Jan 10, 2019

Conversation

@gedaiu
Copy link
Contributor

@gedaiu gedaiu commented Jan 10, 2019

fix #2246

@gedaiu gedaiu force-pushed the fix-array-clone branch from fb9ba02 to 01cc20c Jan 10, 2019
@gedaiu
Copy link
Contributor Author

@gedaiu gedaiu commented Jan 10, 2019

I guess the ~= operator is confusing for arrays. I often do the same mistake. Do you think that a method like addObject would help?

Copy link
Member

@s-ludwig s-ludwig left a comment

There is appendArrayElement, which sounds like it should be the same as addObject. This issue is one of the things that lead to stdx-data-json not having any of these convenience operators directly in its value type. Although it definitely reduces the amount of visual noise in some places, the effects can often be unexpected in a statically typed language.

@dlang-bot dlang-bot merged commit 78b0bbe into vibe-d:master Jan 10, 2019
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants