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

doc for property destructuring #41189

Merged
merged 4 commits into from
Jun 14, 2021
Merged

doc for property destructuring #41189

merged 4 commits into from
Jun 14, 2021

Conversation

ArunS-tack
Copy link
Contributor

@ArunS-tack ArunS-tack commented Jun 11, 2021

closes #41181.

Don't mind the commit message, that's a typo.

@fredrikekre fredrikekre requested a review from simeonschaub June 11, 2021 11:58
@simeonschaub
Copy link
Member

Could you move that section above the argument destructuring one? I think it could also fit a bit better with the flow of the Destructuring Assignment and Multiple Return Values section, so start with something like

Instead of destructuring based on iteration, the right side of assignments can also be destructured using property names. This follows the syntax for NamedTuples, and works by assigning to each variable on the left a property of the right side of the assignment with the same name using getproperty:
[simple example here]

I think that would read nicer in the manual than the News entry you copied here. I would then also move the parts about argument destructuring in functions to the dedicated Argument Destructuring section just below.

Also, please try to run the doctests you pasted here yourself, the first one looks incorrect and the linebreaks are also off.

@simeonschaub simeonschaub added the docs This change adds or pertains to documentation label Jun 11, 2021
@DilumAluthge DilumAluthge requested review from simeonschaub and removed request for simeonschaub June 11, 2021 21:46
@simeonschaub simeonschaub added the merge me PR is reviewed. Merge when all tests are passing label Jun 11, 2021
@simeonschaub simeonschaub merged commit 876da30 into JuliaLang:master Jun 14, 2021
@ArunS-tack ArunS-tack deleted the docc branch June 14, 2021 16:14
@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label Jun 18, 2021
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
Co-authored-by: Simeon Schaub <simeondavidschaub99@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

document property destructuring
3 participants