Daniel Ehrenberg, a software engineer at Bloomberg and VP of ECMA International, talks about new features in JavaScript such as Promises, Maps & Sets, Records, Tuples & Temporal. He also discusses cross-project standardization efforts, open source sustainability, and how Bloomberg gives back to the web ecosystem.
Promised Out With Resolvers simplifies promise construction, eliminating the need to save and use resolve and reject functions.
Array Grouping proposal introduces methods to group elements of an array based on specific criteria, improving code readability.
Error Cause proposal allows providing additional context by linking errors, simplifying error handling and debugging.
Decorators offer a cleaner syntax to modify or annotate classes, methods, or properties, making code management easier.
Deep dives
Promised Out With Resolvers
Promised Out With Resolvers is a new function that simplifies the construction of promises by returning an object with three properties: promise, resolve, and reject. This eliminates the need to save and use the resolve and reject functions. The goal is to streamline the creation of promises and make the code more concise.
Array Grouping
Array Grouping is a proposal to add group-by functionality to the JavaScript standard library. This proposal introduces methods to object and map that allow you to group elements of an array based on specific criteria. It helps simplify code and improve readability when dealing with grouping operations on arrays.
Error Cause
Error Cause is a proposal to include a cause parameter when creating an error. This allows you to provide additional context or information about an error by linking it to another error. It helps in providing a clear and meaningful error trace and can simplify error handling and debugging.
Decorators
Decorators is a proposal to add a new way to modify or annotate classes, methods, or properties by applying decorators. Decorators provide a cleaner syntax for adding additional behaviors or functionality to existing code, making it easier to organize and manage complex codebases.
TypeScript's experimental decorators are being standardized
The podcast discusses the standardization of TypeScript's experimental decorators, emphasizing the transition of decorators from stage two to stage three in the TC39 process. It explores the importance of having a clear and unambiguous specification for decorators and the future implementation timeline. The episode highlights the significance of aligning the language specification with the actual behavior of decorators in TypeScript and the potential impact on the JavaScript ecosystem.
Temporal: New date-time library in JavaScript
The podcast introduces Temporal, a new date-time library in JavaScript, and focuses on its unique features and benefits. It highlights the shortcomings of the existing JavaScript Date object and explains how Temporal addresses those issues. The episode emphasizes how Temporal provides different types for different date-time data pieces and enables calculations and formatting with improved accuracy and immutability. It also mentions the availability of documentation, examples, and a polyfill for interested users.
Winter CG and standardization efforts
The podcast delves into Winter CG, a community group aiming to standardize JavaScript for server environments and intercompatible runtimes. It highlights the purpose of Winter CG in aligning different server runtimes and establishing a minimum common API for improved compatibility. The episode discusses ongoing standardization efforts within Winter CG, including the exploration of a package JSON standard, the unification of fetch behavior for servers, and the potential development of module expressions and declarations. It also mentions the need for sustainable open-source practices and the importance of companies sponsoring open-source projects and hiring developers specializing in open-source work.
Daniel Ehrenberg (software engineer at Bloomberg, web standards author / champion & VP of ECMA International) joins us to discuss new features that have landed in JavaScript and to preview what’s cooking in various standards bodies across the web platform.
We cover a wide array (get it?) of topics from improvements to built-ins such as Promises, Maps & Sets, as well as new primitives like Records, Tuples & Temporal. We round out this epic discussion with a look at cross-project standardization efforts like WinterCG, open source sustainability & how Bloomberg’s open source program gives back in important projects in the web ecosystem.
React Jam – React Jam is an online event where React developers come together to create games in 10 days. Let’s do this!
Fastly – Our bandwidth partner. Fastly powers fast, secure, and scalable digital experiences. Move beyond your content delivery network to their powerful edge cloud platform. Learn more at fastly.com
Fly.io – The home of Changelog.com — Deploy your apps and databases close to your users. In minutes you can run your Ruby, Go, Node, Deno, Python, or Elixir app (and databases!) all over the world. No ops required. Learn more at fly.io/changelog and check out the speedrun in their docs.
Correction: Near the end, Dan misspoke when said the Bloomberg FOSS Fund was done in partnership with Bloomberg Philanthropies. It was actually done together with Bloomberg’s Corporate Philanthropy team.