Home

2022.03.14 - ECMAScript proposal: Types as Comments

Pi

Ping Xia

March 14, 20225 min read

Title: 2022.03.14 – ECMAScript Proposal: Types as Comments

This Week’s Highlights

ECMAScript proposal: Types as Commentshttps://github.com/giltayar/proposal-types-as-commentshttps://www.zhihu.com/question/521070005/answer/2382575941https://devblogs.microsoft.com/typescript/a-proposal-for-type-syntax-in-javascript/https://2ality.com/2022/03/type-annotations-first-look.htmlhttps://nodesource.com/blog/new-JavaScript-era-coming
This proposal aims to let developers add type annotations to their JavaScript code, which can be checked by an external type checker. At runtime, a JavaScript engine ignores them, treating the types as comments.

How to Upgrade to the React 18 Release Candidatehttps://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html
React 18 introduces features powered by a new concurrent renderer, with a gradual‑adoption strategy for existing apps. This post walks you through the steps for upgrading to React 18. Related: Automatic batching support in React 18

WebGPU — All of the cores, none of the canvashttps://surma.dev/things/webgpu/
WebGPU is an upcoming Web API that gives low‑level, general‑purpose access to GPUs. I’m not a graphics expert; I learned bits of WebGL by following tutorials on building game engines with OpenGL and by watching Inigo Quilez create amazing ShaderToy demos using only shaders (no 3D meshes). That got me far enough to build things like the background animation in PROXX, but I never felt comfortable with WebGL, and I’ll explain why shortly.

How to design better APIshttps://r.bluethl.net/how-to-design-better-apis
Fifteen language‑agnostic, actionable tips for REST API design.

Algorithms for Modern Hardwarehttps://en.algorithmica.org/hpc/
An upcoming high‑performance‑computing book titled Algorithms for Modern Hardware by Sergey Slotin. It’s aimed at everyone from performance engineers and practical algorithm researchers to undergraduate CS students who have just finished an advanced algorithms course and want to learn practical ways to speed up programs beyond the usual O(n log n) → O(n log log n) improvements. Related: So You Want to Study Mathematics…

Agile Principles: Adaptive Self‑Organizinghttps://www.simplethread.com/agile-principles-11-adaptive-self-organizing/
The idea of self‑organizing teams is at the heart of Simple Thread. Justin and I founded the company as two senior engineers envisioning a workplace we’d love to be in: the kinds of clients we’d serve, the technologies we’d use, the architectures, the UX tools, how engineers and designers would collaborate, and so on. In many ways, Simple Thread is the logical extension of a self‑organizing team.

In‑Depth Reading

Building Web3: Bertyhttps://blog.ipfs.io/2022-03-11-berty/
We’re excited to share another video in the Building Web3 video series (opens new window), an ongoing showcase of technologists, teams, and visionaries building valuable tools and services for an ever‑growing, ever‑changing Web3 world. Imagine being able to communicate freely and securely anywhere, anytime—whether or not you have internet access.

Who says HTML and CSS aren’t real programming? (Ep. 421)https://stackoverflow.blog/2022/03/08/the-new-stack-overflow-podcast-ep-421/https://briefs.video/videos/is-html-a-programming-language/
Welcome to the new Stack Overflow podcast. In our relaunch episode, the home team covers code‑scanning for security vulnerabilities in open‑source registries, whether high‑profile skills‑training programs from Google and Amazon really address systemic inequity in tech (spoiler: probably not), and how a James Bond character sparked Matt’s interest in security.

The HTML** ** element and its (undefined) segment boundarieshttps://www.ctrl.blog/entry/html-meter-segment-boundaries.html
I recently found a use for the <meter> element: representing a scalar measurement within a known range (that’s the clunky term the HTML Standard uses for a horizontal gauge bar). However, I was dismayed to discover that different browsers interpret a vaguely defined aspect of the <meter> element very differently. Here’s what I found and a workaround to achieve consistent behavior across browsers.

Applying Product Thinking to Slack’s Internal Compute Platformhttps://slack.engineering/applying-product-thinking-to-slacks-internal-compute-platform/
According to a recent ThoughtWorks radar, “the industry is increasingly gaining experience with platform‑engineering product teams that create and support internal platforms.” The radar adds a word of caution: “When creating a platform, it’s critical to have clearly defined customers and products that will benefit from it rather than building in a vacuum.”

Bottlenecks of Scale‑upshttps://martinfowler.com/articles/bottlenecks-of-scaleups/
A collection of articles on common problems startups encounter when scaling.

Coda’s ritual of innovation: How we created (almost) 100 Packs in one dayhttps://blog.coda.io/codas-ritual-of-innovation-how-we-created-almost-100-packs-in-one-day-7f7c0a4dbffb
We recently created (almost) 100 Packs in a single day and had a lot of fun doing it. Here at Coda we celebrate maker culture—we believe that, with the right tools, anyone can be a maker. Quarterly hackathons are a central part of that culture, and 75 % of our best ideas come from hackathons (packs, charts, reactions, dark mode, etc.). (If you want to learn more about this important innovation ritual or need help running your own hackathon, check out my Hackathon guide.)

Artificial Intelligence Is Eating Our Languagehttps://onezero.medium.com/ai-is-eating-our-language-b49fd5f93855
When using AI to enforce inclusive language, be careful what you wish for.

Deep Learning Is Hitting a Wallhttps://nautil.us/deep-learning-is-hitting-a-wall-14467/
What would it take for artificial intelligence to make real progress?

Fresh Finds

Why does Google get internationalization wrong?https://smaller.fish/posts/language
And yet, in the alternate reality we all live in, if you take your laptop from one country to another, some websites suddenly start serving you content in a different language based solely on…


Originally written by Ping Xia (平侠) and published in Chinese on Web技术周刊 (Web Tech Weekly). Translated and adapted for DriftSeas with permission.

Keep reading

More related articles from DriftSeas.