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

Random comments #226

Closed
wants to merge 2 commits into from
Closed

Random comments #226

wants to merge 2 commits into from

Conversation

ltratt
Copy link
Contributor

@ltratt ltratt commented Feb 5, 2021

Do not merge this ever, under any circumstances -- this is not a normal PR!!!

This is not a PR intended for merge: it's a complete repo code review. Inevitably it's shallow, but it's still thrown up some interesting things. Overall, I'm pretty happy with the code, but we can always improve things :)

There's a mix of things in here. Sometimes I've rephrased a comment; sometimes I've asked a question; less often I have a code change suggestion. So sometimes you can probably just copy an edited thing into your own PR; but sometimes we'll have to have a debate here to decide the way forwards.

What I suggest is that @ptersilie and @vext01 go through each bit of the diff and we use the nomal GitHub comments to decide on things. Then we can open up one or more PRs that address the valid comments in this PR.

Some general comments, in no particular order:

  1. We use hard-coded constants a bit more often than I'd like (e.g. Local(0) for the interpreter context). We should be careful to weed as many of these out as possible (I won't have found all of them!) and make sure we don't introduce any more ni future.
  2. There were some completely redundant comments of the form "// Does x" for x. Let's kill those.
  3. A few functions and structs could do with documenting and/or better documenting.
  4. Similarly, I think we should expect all non-test files to have a doc-comment at the top to explain a bit better what the file's contents are.
  5. We've got a curious mix of really-well commented code and sparsely/poorly commented code. I think we need to be a bit more ruthless in future code review at ensuring that complex things have good comments. That's both a quantity (sometimes we just don't say enough!) and quality issue (we have quite a few comments that I could make little sense of).

Overall, the aim of this is to make our future selves happier at what our current selves did :) Bear in mind that I'm not familiar with large chunks of the repo, and so some of my comments will be inane, incorrect, or perhaps plain bonkers.

bors bot added a commit that referenced this pull request Feb 22, 2021
253: Address more comments from #226. r=ltratt a=ptersilie



Co-authored-by: Lukas Diekmann <[email protected]>
@bjorn3
Copy link
Collaborator

bjorn3 commented Feb 28, 2021

Is there anything not yet fixed?

@ltratt
Copy link
Contributor Author

ltratt commented Mar 1, 2021

@ptersilie Any thoughts on @bjorn3's question?

@ptersilie
Copy link
Contributor

ptersilie commented Mar 1, 2021

I've resolved all the discussions I've dealt with. There's still 3 other discussions which I think @vext01 has fixed, but not yet marked as resolved. So I think this PR is done, though I'd like @vext01 to confirm as well.

@vext01
Copy link
Contributor

vext01 commented Mar 1, 2021

Resolved discussions.

@vext01 vext01 closed this Mar 1, 2021
@vext01 vext01 reopened this Mar 1, 2021
@vext01
Copy link
Contributor

vext01 commented Mar 1, 2021

Sorry, wrong button.

@vext01
Copy link
Contributor

vext01 commented Mar 2, 2021

Can we close this?

@ltratt
Copy link
Contributor Author

ltratt commented Mar 2, 2021

I believe this is now completed, so I'm closing it.

@ltratt ltratt closed this Mar 2, 2021
@ltratt ltratt deleted the random_comments branch March 2, 2021 14:38
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.

4 participants