High Scores stub

I was late to the PR review before it got merged. I find the anonymous function a bit confusing. I wonder how new users will think of it.

Will new users get confused about what to do with the scores argument? Will they think that maybe they can use it in the HighScores methods as some kind of closure?

I think we should add at least some kind of comment that the scores argument needs to be added to the high_scores object … somehow. Something like

return function(scores)
  local high_scores = {}

  -- TODO: store the scores in the high_scores object ...

  setmetatable(high_scores, { __index = HighScores })
  return high_scores
end
1 Like

Also, the OOP article I wrote isn’t very visible. I propose to add an instructions.append.md so there’s a link to it in the introduction:

# ignore

## Further reading

You can read more about OO programming in Lua [in this article][oop].

[oop]: https://exercism.org/tracks/lua/exercises/high-scores/articles/oop
2 Likes

@ryanplusplus @imo @keiraville Thoughts?

Both suggestions sound good to me

1 Like