Updating the specification J а Vascript standardizes a balanced and thought-out set of functions. Here is the built-in global iterator, and new SET methods, and improvement of regular expressions.
The main innovation, writes Xrust, is the new built -in Iterator object and its functional operators. Among other updates are new SET methods, direct imports of JSON modules, improvement of regular expressions, new Promise.Try method of optimization of Promisece tables and new float16arra ytipized massif.
The largest addition, which specification, which specification is specified. Describes as “the new iterator global object with connected static and prototypical methods for working with iterators.
Here it all starts with the built -in global Iterator. (If you press F12 and open the J а Vascript console in Devtools, you can see that there is an object there.) This object allows you to wrap up the existing iteric objects in a new interface that provides functional operators such as a Filter MAP.
The most interesting part of this wrapper has two aspects: it improves the syntax, providing functional operators for iberized objects that do not have them lazily, with a stiff assessment of elements. This gives a performance in performance, especially for large or streaming collections.
The new iteratorcal function allows you to create wrappers for simple iterators who do not have functional operators, such as functions generators. This means that Array and other iterized objects can be processed as part of the same coordinated API, which increases performance.
It should be emphasized that Array S operators S in J а Vascript, despite the presence of built-in functional operators, They work actively calculating the entire array and creating intermediate “working arrays” at each stage of the operation. Thus, whenever you call Map or Filter, you mean the background creation of a submissive. Iterator works like other API in the style of functional programming (for example, Java Streams), where each operator is processed elementally, and the new collection is created only when the final operator is reached.
Xrust updating JavaScript specification this year covers many aspects
- Если Вам понравилась статья, рекомендуем почитать
- The Internet is 30% filled with fake creatures
- AI hand worked on texts 13.5% of scientific papers