In the under-application case, the remaining parameters get assigned the undefined value. In the over-application case, the remaining arguments can be accessed by using the rest parameter and the
argumentsproperty, or they are simply superfluous and they can be ignored. Many Web/NodeJS frameworks nowadays use this JS feature to accept optional parameters and create a more flexible API.
Until recently, V8 had a special machinery to deal with arguments size mismatch: the arguments adaptor frame. Unfortunately, argument adaption comes at a performance cost, but is commonly needed in modern front-end and middleware frameworks. It turns out that, with a clever trick, we can remove this extra frame, simplify the V8 codebase and get rid of almost the entire overhead.
We can calculate the performance impact of removing the arguments adaptor frame through a micro-benchmark.
Some of these were helpful!
After trying out Deno I got passionate about it. This post introduces my first Deno module, a simple preprocessor for HTML files that runs Deno where the new
<deno>tag is specified. How useful can a simple file preprocessor be? What can it help build?
When explaining a technology, we have to decide how to approach its shortcomings. There might be mistakes in its design, or it might have usability problems, or it might be unreliable. How do we approach these and how much emphasis do we place on them?
One approach is: “This tool has a lot of problems, but we’ll show you how to avoid them.” That can demotivate the learner: “Why am I learning this thing if it has so many problems?”
In 2016, Sam Saccone discovered a vulnerability that allows adversaries to run arbitrary scripts when installing an NPM package of theirs.
I’m quite excited about the direction of this work, and while it isn’t yet production ready, is worth keeping on your radar. I’d heavily recommend reading the RFC or watching Dan and Lauren’s talk for more detail.
Ok so why exactly doesn’t the
Fetch API have progress events, like the old
XMLHttpRequest API? What am I missing here?
Ah, looks like
Fetch has progress update events for downloads, but not uploads. But why?
Stencil is a React-inspired web component library. It is using the same JSX as React and some of the same concepts (Render function, props, state). However, Stencil differs as it compiles to an optimal bundle, creating Virtual DOM that is consolidated directly into the DOM itself (no VDOM to VDOM comparison). The result is standard web components with optimal performance.
This looks interesting. Maybe I need to look into replacing webpack…