ECMAScript TC39 - Smaller Additions
The ECMAScript TC39 committee gathered last week in Tokyo and they have analyzed the new language proposals and moved to one of the five maturity stages they have to go through before they are officially adopted in the language this time.
STAGE 0 - Strawman Idea
STAGE 1 - Proposal Concept
STAGE 2 - Draft Specs
STAGE 3 - Candidate Implementation
STAGE 4 - Finished
Today we will see about the smaller additions which still have a potential impact with your developer experience.
1.MATH SUM PRECISE
MATH SUM PRECISE Proposal has moved to STAGE 3 where it has been officially been recommended for implementation.
It proposes adding a method to sum multiple values at once.
As an additional benefit it promises more precision when working with floats.
2.Extractors
Extractors are now in version 2 and are proposing new destructuring forms for binding and assignment patterns.
The main motivation is to provide a mechanism for executing user-defined logic during destructuring so that operation related to data validation and transformation can be performed in one step.
3.Promise Try
Promise try has reached stage 4 and will be included in JS. This feature provides a new method which allows developers to wrap a function in a promise for improved error handling and simpler promise chains.
It ensures the function is executed immediately and returns a promise making it easier to handle both synchronous and asynchronous operations in a consistent manner.
4.IS ERROR
IS ERROR proposal is currently in STAGE 2 uses a new method to reliably determine if a value is an instance of a native error The Proposal addresses issues with existing methods like instance of error which are unreliable in various environments
5.Temporal API
Temporal API - Aims to replace the problematic date object with a more accurate and flexible API for handling dates times and time zones
Note: These features are not in the standard yet and some of them might never end up being adopted
Subscribe to my newsletter
Read articles from nidhinkumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by