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
Copy link
Contributor Author

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Json clone concatenates arrays
3 participants