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

Use prototype internal methods #10

Open
jmsv opened this issue May 13, 2019 · 1 comment
Open

Use prototype internal methods #10

jmsv opened this issue May 13, 2019 · 1 comment

Comments

@jmsv
Copy link
Owner

jmsv commented May 13, 2019

At the moment, OatyArray is built as a class with internal methods, but to match Array it should be a function with OatyArray.prototype methods, e.g. OatyArray.prototype.push(). This has benefits, such as that all OatyArray instance methods are references to the prototype implementation.

This post does a great job of explaining how prototypes work and how to implement them.

@j-m
Copy link
Collaborator

j-m commented May 13, 2019

Is this not a duplicate of #4 ?

# 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

2 participants