-
Notifications
You must be signed in to change notification settings - Fork 851
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
ES2015 TypedArrays missing all methods they ought to share with regular Arrays, like map/indexOf/includes etc #1411
Comments
@andreabergia do you agree that all method are now implement (albeit having failing tests here and there), except for static stuff that ought to be implemented in the missing TypedArray prototype? If so, I think we can close this case, as we have individual cases for the other stuff, agree? |
Neither here nor there, but I think that someone should take the time to
convert the NativeArray to lambdas (it's a big job) and then take a sharp
look at the architecture of the native arrays and see if that can be
improved once we've done that -- I did the native arrays a long time ago, I
recall that they were weird, and I recall doing a lot of weird things to
make them work that might not be necessary any more now that we have a
construct that maps more closely to the actual language.
…On Fri, Aug 23, 2024 at 12:02 PM Paul Bakker ***@***.***> wrote:
@andreabergia <https://github.com/andreabergia> do you agree that all
method are now implement (albeit having failing tests here and there),
except for static stuff that ought to be implemented in the missing
TypedArray prototype?
If so, I think we can close this case, as we have individual cases for the
other stuff, agree?
—
Reply to this email directly, view it on GitHub
<#1411 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD7I25FJAJIZMW7CQOVD2LZS6BM5AVCNFSM6AAAAABNAWSQFGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBXGY2TCOJYGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I think doing that in #1565, which involves creating a NativeTypedArray class containing most of the scripting API impl. And have that be the prototype for all typed array constructors would make sense |
@andreabergia what's your take on whether the scope of just adding the missing method is now done or not? |
Sorry for the late answer. |
Everything mentioned in this case for done in various derived cases and PRs, so closing |
All TypedArray implementations ought to have a large chunk of methods that regular Arrays also have, like indexOf/includes/map/forEach etc. However, those all seem to be missing, see https://compat-table.github.io/compat-table/es6/ > built-ins > typed arrays
In addition to the missing methods that are defined in ES2015 (ES6):
ES2022 specifies the .at() method on (Typed)ArraysArray find from last
Change Array by copy
, see Support ES2023 Change Array by copy #1307The text was updated successfully, but these errors were encountered: