Recent submissions

Comment · 3 years ago
Comment · 4 years ago
Yep, looks like they are the same.
Comment · 4 years ago
Comment · 4 years ago
Bun is using the JavaScriptCore engine which is the Webkit/Safari Javascript engine. It is not written in Zig.
Comment · 4 years ago
This is not efficient. Each iteration creates a new array instance due to the spread operator.
Comment · 5 years ago
React is slow for the perf targets of VSCode.
Comment · 5 years ago
The # symbol denoting private fields has already been finalized and approved to be a legal part of the language. No going back.
Comment · 5 years ago
Object properties defined as Symbols (even through classes) are still accessible by e.g. Object.getOwnPropertyDescriptors(myObject)

Before the private fields, it was possible to create private properties through a WeakMap object which is somewhat clumsy and not very performant.

Comment · 7 years ago
It is already implemented in the current Firefox, Chrome and Safari 12.
Comment · 8 years ago
Some TC39 members proposed this. It is in no way even discussed or decided by the TC39 committee yet. The fancy naming is proposed by some as a solution to prevent name collisions with the flatMap and flatten array methods used by an old version of the Mootools library. I.e. do not break the web.
Comment · 9 years ago
The premise of the article that the more objects that mutate state locally are used the more complex and more difficult it is to reason about the system becomes is not true. The core principle of data encapsulation in OOP ensures your system will be manageable as it grows. This principle breaks down the complexity into manageable units of self managed simpler pieces of subprograms that are more easily to reason about. And as history has shown this approach did provide capability to programmers to build more complex and manageable systems.
Comment · 9 years ago
As an event listener "function(e) {this}" is not the same as "(e) => this". With the regular function "this" points to the element on which the event listener was attached to while with the arrow function "this" points to the context (i.e. "this") of its lexical environment.
Comment · 9 years ago
why not just use acc[prop] = value ?
Comment · 9 years ago
There are global symbols. You use Symbol.for() to either create or retrieve them. E.g. Symbol.for('hello') is available globally through the global registry. It should be noted that an already existing symbol e.g. Symbol('hello') is not the same as Symbol.for('hello') while Symbol.for('hello') === Symbol.for('hello')
Comment · 9 years ago
Typescript is designed to be compiled to JS. WASM is designed for staticly compiled languages. Even if there is GC and DOM access through WASM, Typescript will be better off to run for the natively JIT optimized JS path.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton