Skip to content

address comments#1

Merged
danking merged 1 commit intomasterfrom
address-patricks-comments
Dec 5, 2018
Merged

address comments#1
danking merged 1 commit intomasterfrom
address-patricks-comments

Conversation

@danking
Copy link
Owner

@danking danking commented Dec 5, 2018

@patrick-schultz
Copy link

Looks good. Some ideas for getting more out of this exercise:

  • Try making the stack generic in the type of data held. This will force you to grapple more with questions of how to pass and return arguments, since with ints you can just always copy.
  • Try using iterators rather than indices to keep your place inside containers. This is a more C++ style, because it more easily allows generalizing the container type. (Much of C++ is all about generic programming, so going through the exercise of making your code as generic as possible is a good way of learning about C++, and particularly the STL.)
  • More about exploring the tstack problem than C++: see if you can avoid reference counting. I'm working on an implementation now that I think will work without smart pointers of any kind.

@danking danking merged commit b87fc59 into master Dec 5, 2018
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.

2 participants