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

Cannot subclass builtin types #147

Open
lance opened this issue Nov 20, 2014 · 0 comments
Open

Cannot subclass builtin types #147

lance opened this issue Nov 20, 2014 · 0 comments

Comments

@lance
Copy link
Member

lance commented Nov 20, 2014

Array has already been addressed, but other builtin types such as Date, String, Boolean and Number cannot be subclassed. This is a low priority, because it's not really clear what you'd do with a subclass of Number or Boolean, because successfully subclassing them in V8 you end up with a semi-useless object. E.g. you can't subclass Number and then add an instance of that subclass to a real number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant