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

Add manipulation function to pointer example #22

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

mmichaelb
Copy link
Contributor

Implements the feature from #21

@sagar-jadhav sagar-jadhav added enhancement New feature or request Hacktoberfest Issues to participate in Hacktoberfest 2021 labels Oct 5, 2019
@sagar-jadhav sagar-jadhav requested a review from aprabhat October 5, 2019 17:28
Copy link
Collaborator

@aprabhat aprabhat left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. Please see the review comments.

)

func main() {
b := 255
var a *int = &b //Saving b's address into variable a
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you @mmichaelb for the valuable contribution.
I think its better so start with basic things first like how to declare a pointer, what is the significance of '*' and '&' sign. So please add some code comments related to that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I definitely agree with you on this one. However, my pull request/referred issue was really only about the implementation of the pointer function to show another Pointer related feature. Anyway, I am happy to deal with this matter as part of another issue.


size := new(int) // we can imagine that "new" keyword is a pointer
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add correct definition of new as its a built in function that allocates memory and return address of it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As already mentioned, the same applies for this one. I totally agree with you but this pull request/issue simply does not address this topic/problem. In order to maintain the issue structure, I would rather deal with this problem in another issue/pull request.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In order to maintain the issue structure, I would rather deal with this problem in another issue/pull request.

I really appreciate that! Thank you. Merging this request and will open new issues for improvement of code comments.

Copy link
Collaborator

@rajkumarGosavi rajkumarGosavi left a comment

Choose a reason for hiding this comment

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

Needs a lot of comments as readers usually find this topic difficult to learn it would be better to help them as much as you can. Dig deeper in this topic and it will also help you in your life.

@aprabhat aprabhat merged commit 43fe58d into sagar-jadhav:master Oct 9, 2019
@sagar-jadhav
Copy link
Owner

@mmichaelb I appreciate your contribution 👍

#73 & #83 is created for improvement related to this PR. Can you have a look into those issues?

@mmichaelb
Copy link
Contributor Author

mmichaelb commented Oct 9, 2019

Sure, of course! Right now I'm pretty busy at work, but I'll see that I can find a few minutes 😉

@sagar-jadhav
Copy link
Owner

@mmichaelb Take Your Time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest Issues to participate in Hacktoberfest 2021
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants