Change Array by copy For Stage 2

Change Array by copy For Stage 2

Ashley Claymore, Bloomberg



1

High Level Summary

How do the non-mutating methods inspired by Tuple.prototype work out on Arrays and TypedArrays so all three could participate in a common interface?

2

Interaction with Record & Tuple

Record & Tuple

Idea

Naming & New methods

Change Array by copy

3

April 2021 Meeting

Past-tense pattern presented .sorted() .popped()

Support for returning value without array holes Concerns on O(n) performance not being clear from the name

.pop O(1) .popped O(n) Large surface area to check for web compatibility Stage 1

4

Array

.pop .push

.shift

.splice

.unshift

.concat .flat .flatMap

.copyWithin .fill .reverse .sort

Mutate

.entries .every .filter .find .findIndex .forEach .includes .indexOf .join

.keys .lastIndexOf .map .reduce .reduceRight .slice .some .values

.set

TypedArray

.subarray

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download