4 ms·
Some of the burnout no doubt being due to the catastrophizing of every decision by the community and the extreme rhetoric used across the board. Great to see p
by mplanchard 6mo ago
Some of the burnout no doubt being due to the catastrophizing of every decision by the community and the extreme rhetoric used across the board.
Great to see people wanting to get involved with the project, though. That’s the beauty of open source: if it aggravates you, you can fix it.
- selfhoster1312 6mo agoAs an example of this, i remember a huge debate at the time about `await foo()` vs `foo().await` syntax. The community was really divided on that one, and there was a lot of drama because that's the kind of design decision you can't really walk back from. Retrospectively, i think everyone is satisfied with the adopted syntax.
- jurgenburgen 6mo ago> Retrospectively, i think everyone is satisfied with the adopted syntax. Maybe it’s a case of agree and commit, since it can’t really be walked back.
- diondokter 6mo agoVarious prominent people have said years after that .await was the correct choice after all
- staticassertion 6mo agoI'm not prominent but I disagreed with it at the time and I was wrong.
- adastra22 6mo agoI’m curious - why were you wrong? It still seems like a wart to me, all these years later. What am I missing?
- tracker1 6mo agoContrast it with async in JS/ES as an example... now combine it with the using statement for disposeAsync instances. await using db = await sqlite.connect(await ctx.getConfig("DB_CONN")); It's not so bad when you have one `await foo` vs `foo.await`, it's when you have several of them on a line in different scopes/contexts. Another one I've seen a lot is... const v = await (await fetch(...)).json(); Though that could also be... const v = await fetch(...).then(r => r.json()); In any case, it still gets ugly very quickly.
- adastra22 6mo agoI’ve never in my life used JS, so I’ll have to take your word for it.
- tracker1 6mo agoIt's a language I'm familiar with that uses the `await foo` syntax and often will see more than one in a line, per the examples given. C# is the most prominent language that has similar semantics that I know well, but is usually less of an issue there.
- fluffybucktsnek 6mo agoI'll give my two cents here. I work with Dart daily, and it also uses the `await future` syntax. I can cite a number of ergonomic issues: ```dart (await taskA()).doSomething() (await taskB()) + 1 (await taskC()) as int ``` vs. ```rust taskA().await.doSomething() taskB().await + 1 taskC().await as i32 ``` It gets worse if you try to compose: ```dart (await taskA( (await taskB( (await taskC()) as int )) + 1) ).doSomething() ``` This often leads to trading the await syntax for `then`: ```dart await taskC() .then((r) => r as i32) .then(taskB) .then((r) => r + 1) .then(taskA) .then((r) => r.doSomething()) ``` But this is effectively trading the await structured syntax for a callback one. In Rust, we can write it as this: ```rust taskA(taskB(taskC().await as i32).await + 1).await.doSomething() ```
- 6mo ago
- steveklabnik 6mo agoI was initially very against postfix await and I was wrong. It's great.
- zozbot234 6mo agoIt makes sense that there was a huge debate, because the postfix .await keyword was both novel (no other languages had done it that way before) and arguably the right call. Of course, one can argue that the ? operator set a relevant precedent.