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

Hack Array Immutable Documentation #1354

Open
MujingZhou opened this issue Nov 9, 2023 · 0 comments
Open

Hack Array Immutable Documentation #1354

MujingZhou opened this issue Nov 9, 2023 · 0 comments

Comments

@MujingZhou
Copy link

Please complete the information below:

Where is the problem?

What is the problem?

  • It is confusing/wrong in this piece of the example code ("C\contains($items, 'a'); // true"). After modifying in above lines, it should be false
  • When explaining the immutable characteristic, I suppose it means the modification does not occur at the same memory location referenced Hack array, but instead create a modifiable copy. Perhaps it can use an example so it first assign the array to another variable ($items2 = $items) and then modify the $items, and check the values for both $items and $items2

Please don't change anything below this point.


  • Build ID: HHVM=HHVM-4.164.0:HSL=v4.108.1:2023-11-08T01:59:56+0000:1fa47f258c6b68f8ec01899aa82fd6ffa0957109
  • Page requested: /hack/arrays-and-collections/vec-keyset-and-dict
  • Page requested at: Thu, 09 Nov 2023 00:23:18 +0000
  • Controller: GuidePageController
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