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/tut1: new section on functions and methods #122

Merged
merged 1 commit into from
Dec 12, 2021

Conversation

ZoomRmc
Copy link
Contributor

@ZoomRmc ZoomRmc commented Dec 11, 2021

This PR adds a new section on functions and methods to the first part of the tutorial.

The added text clarifies the differences between the three and provides some benefits of using funcs which explains their existence in the language.

This PR aims to answer a repeating question of "which of the three should I use?" coming from new language users, which was observed on multiple occasions by the @PMunch and others.

Most of the work is by @PMunch, part about functions coauthored by me in a declined edit of the merged PR (nim-lang/Nim#19207)

Copy link
Collaborator

@saem saem left a comment

Choose a reason for hiding this comment

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

Change all references to nimskull

@alaviss
Copy link
Contributor

alaviss commented Dec 11, 2021

You should change the commit author to PMunch <[email protected]>, then add the following Co-authored-by as evident by upstream commit:

Co-authored-by: Danil Yarantsev <[email protected]>
Co-authored-by: konsumlamm <[email protected]>
Co-authored-by: Zoom <[email protected]>

When backporting I'd prefer that we keep as much authoring metadata as possible.

@saem
Copy link
Collaborator

saem commented Dec 11, 2021

This is a good idea, in starting to review further.

We have pr guidelines so could you start sprucing up the description accordingly for others? I don't want to have strong references into Nim as we do things differently and I don't want to give people the wrong omissions as they try and soft through what does and doesn't make sense.

@ZoomRmc
Copy link
Contributor Author

ZoomRmc commented Dec 11, 2021

Change all references to nimskull

Wait, do you mean the whole doc? Changing only in the edited section doesn't make a lot of sense.

could you start sprucing up the description accordingly for others

Not sure I'm following. Sprucing up what description accordingly to what?

@saem
Copy link
Collaborator

saem commented Dec 12, 2021

Change all references to nimskull

Wait, do you mean the whole doc? Changing only in the edited section doesn't make a lot of sense.

Let me clarify, I recently added |NimSkull| and |Nim| (not preferred) to rstcommon.rst, you can check them out here. Please use those at least for the parts you edited -- broader change can be separate, but I'd prefer that first to be honest.

could you start sprucing up the description accordingly for others

Not sure I'm following. Sprucing up what description accordingly to what?

We have a PR template, that should have popped up, please see the contents here, thanks.

Specifically, here are some good starting points:

  • shortening the title, no reference to upstream -- they are not
  • doc/tutorial: is likely a reasonable prefix
  • the PR template tips around current state and why these are good changes

Hope those clarify things, keep the questions coming we'll help ya along!

@ZoomRmc ZoomRmc changed the title Tutorial 1: Add extended proc/func/method description from upstream doc/tut1: new section on functions and methods Dec 12, 2021
@ZoomRmc ZoomRmc requested a review from saem December 12, 2021 12:30
Copy link
Collaborator

@saem saem left a comment

Choose a reason for hiding this comment

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

Sneaky ones

doc/tut1.rst Outdated Show resolved Hide resolved
commit c4a4a12
Author: Zoom <[email protected]>
Date:   Sun Dec 12 15:03:50 2021 +0300

    Use |NimSkull| in the new text. Fix formatting.

commit 2630c7b
Author: PMunch <[email protected]>
Date:   Sat Dec 11 17:52:44 2021 +0000

    doc/tut1: new section on functions and methods

    Co-authored-by: Danil Yarantsev <[email protected]>
    Co-authored-by: konsumlamm <[email protected]>
    Co-authored-by: Zoom <[email protected]>
@ZoomRmc ZoomRmc force-pushed the patch-1 branch 2 times, most recently from c4a4a12 to 84a26cd Compare December 12, 2021 13:27
Copy link
Collaborator

@saem saem left a comment

Choose a reason for hiding this comment

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

Bors r+

@saem
Copy link
Collaborator

saem commented Dec 12, 2021

Thanks, @ZoomRmc!

Happy early first commit into nimskull. 🎉 👍🏽 😄

@bors
Copy link
Contributor

bors bot commented Dec 12, 2021

Build succeeded:

@bors bors bot merged commit 0563a67 into nim-works:devel Dec 12, 2021
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

Successfully merging this pull request may close these issues.

3 participants