med-mastodon.com is one of the many independent Mastodon servers you can use to participate in the fediverse.
Medical community on Mastodon

Administered by:

Server stats:

359
active users

#tc39

0 posts0 participants0 posts today

Just noticed this #js behaviour found it interesting/surprising

```javascript
let o = {}
let i = 0;
o?.f?.(i++)
```

The value of `i` is `0` after this expression. I would have thought that the orders of evaluation would still lead to `i++` occurring even if the method call is short circuited. But `i++` never evaluates.

Replied in thread

@deebloo I think the world would be better if instead of moving "browser features" to JS build tools we should put the same effort/time/resources into standardizing the server interface as it prepared to deliver HTML to the browser so that we could get a single coordinated SSR solution.

The overall cognitive capacity of TC39 delegates is reflective of the last hour or two of the final day, day three. the off-topic channel has completely gone off the rails, and the on-topic channel is just barely hanging on. Contributions are constructive yet somehow also unhinged.

we're halfway through day two.

From the agenda for the 104th meeting of Ecma #TC39 (github.com/tc39/agendas/blob/m). Longer or open-ended discussions: JSSugar/JS0: docs.google.com/presentation/d. Slide 40 onward 👀:

Let's standardize as the ecosystem uses it:

JS0: the language implemented by the engines

JSSugar: features that must be compiled by tools to JS0

For developers, JS = #JS0 + #JSSugar

GitHubagendas/2024/10.md at main · tc39/agendasTC39 meeting agendas. Contribute to tc39/agendas development by creating an account on GitHub.

Any #TC39 or similar #JavaScript spec experts in the chat?

Tagged Template Literals work as follows: push a string until interrupted by a variable.

So,

```javascript
unimportant`just an example ${2}`
```

the args are:

```javascript
{
strings: ["just an example ", ""],
values: [2]
}
```

Why? Why doesn't the the spec go "nothing left, no need to do anything"?

Or why not remove all the empty strings before giving me those args?

I tried reading the Ecmascript spec but it's obtuse.

We're shipping `Object.groupBy` and `Map.groupBy` in Firefox 119! :firefox:

Documentation: developer.mozilla.org/en-US/do
Bugzilla: bugzilla.mozilla.org/show_bug.

The initial proposal was a non-static `groupBy` method on `Array.prototype` but when we implemented it in Firefox Nightly we found out it wasn't web compatible. The second version, `group`, also broke some websites. The proposal was then changed to the static methods we have now.

developer.mozilla.orgObject.groupBy() - JavaScript | MDNThe Object.groupBy() static method groups the elements of a given iterable according to the string values returned by a provided callback function. The returned object has separate properties for each group, containing arrays with the elements in the group.

#ECMAScript 2023 (its friends still call it #JavaScript) will standardize allowing #Unix-style shebang lines to indicate a #CommandLine interpreter.

github.com/tc39/proposal-hashb

Of course, the JavaScript kiddies want to call them “hashbangs” because “hash is commonly associated with modern terms involving # such as #hashtag.” No respect for tradition 🧓🏻

GitHubproposal-hashbang/README.md at gh-pages · tc39/proposal-hashbang#! for JS. Contribute to tc39/proposal-hashbang development by creating an account on GitHub.
Replied in thread

@leaverou This was an interesting rabbit hole to dive down. Fundamentally I feel like there is a contradiction here:

First, private fields are intended to provide true, unspoofable encapsulation of state.

Second, proxies are intended to introspect and intercept operations on an object.

These are inherently conflicting goals and you cannot provide either without violating the other. This means using private fields + proxies will fundamentally be broken, the question is just about *how* it's broken.

Seems #TC39 went with the first option. We can certainly debate which one is better, and it's always possible the second approach would have a better outcome. But in the end if we did go that route there would be just as many blog posts about "Proxies considered harmful" or "Private fields aren't actually private, so why are we bothering, just use TypeScript".

This really feels like a "damned if you do, damned if you don't" situation.

The ECMAScript proposal “Set Methods for JavaScript” advanced to stage 3. It provides the following Set methods:

* .intersection(other)
* .union(other)
* .difference(other)
* .symmetricDifference(other)
* .isSubsetOf(other)
* .isSupersetOf(other)
* .isDisjointFrom(other)

github.com/tc39/proposal-set-m
#ECMAScript #JavaScript #TC39

GitHubGitHub - tc39/proposal-set-methods: Proposal for new Set methods in JSProposal for new Set methods in JS. Contribute to tc39/proposal-set-methods development by creating an account on GitHub.

#introduction
I am passionate about making software, knowledge, and information accessible to everyone around the world.

To this end, I'm a Staff Software Engineer at Google on the #i18n engineering team. I lead the team that builds ICU4X, the open-source, modular, portable i18n library in #Rust. I chair #TC39 TG2 for better i18n in #ECMAScript.

I built octave-online.net to make scientific computing more accessible.

I like #boardgames, #hiking, #curling, #classicalmusic.