Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Covariance example could be clearer #3

Open
ChrisBrooksbank opened this issue Aug 4, 2016 · 0 comments
Open

Covariance example could be clearer #3

ChrisBrooksbank opened this issue Aug 4, 2016 · 0 comments
Assignees

Comments

@ChrisBrooksbank
Copy link
Owner

'''c#
circlePusher.Push( new Circle());
Shape aShape = shapePopper.Pop();
'''

Implys we push a Circle onto a stack, and then pop it back off.
In fact this isn't the case as its two separate stack objects.

Also we ought to mention the naiveness of the Stack class, i.e. no bounds checking

@ChrisBrooksbank ChrisBrooksbank self-assigned this Aug 6, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant