News for hackers. Stuff that matters.
Re:Async Rust doesn't have to be hard by athrowaway3z on Friday June 03, 2022 @06:04PM (#31614259)
No its not.

The quality of a abstraction dictates how clear you are able to think about things.

'Less typing and unnecessary fluff' is the difference between writing '100' in Arabic numerals or writing 'C' in roman numerals.

Re:Async Rust doesn't have to be hard by dgb23 on Friday June 03, 2022 @06:38PM (#31614562)
If we're being pedantic then the Rust version is not an abstraction at all. It explicitly states how exactly the object is de-allocated and how it is accessed.

In the Java version, which is definitely not just an Arc<Mutex> but something more opaque and powerful, you let the runtime handle and optimize these things for you, because you really don't want to know. It would only get in the way of the essence of your program, because your program is decidedly not about expressing these things. Well at least the Arc, the Mutex part is not necessarily much better.

So it's not '100' vs 'C' but more like '100 apples' vs 'enough apples'. Both have their upsides and downsides. It certainly is a good thing that both expressions exist.

Re:Async Rust doesn't have to be hard by athrowaway3z on Saturday June 04, 2022 @06:21AM (#31618755)
I like your '100 apples' vs 'enough apples' because it highlights a fundamental choice. The first is a statement that stands alone, whereas the second is a statement requires knowledge of the target/problem you are referencing.

My guess is that in the long run the first is more successful. It doesn't require consensus about a target/problem. However, there are enough places who couldn't care less because everybody knows what enough apples are.

Re:Async Rust doesn't have to be hard by Karrot_Kream on Friday June 03, 2022 @06:41PM (#31614589)
Not everyone values this the same and this is where a lot of preference wars start in PL communities. Some people enjoy keeping the problem space small and having opinionated decisions at the cost of limited expressiveness. Others value expressiveness maximally. This [1] article goes into a lot of the tradeoffs involved with expressivity and cognitive load (with the background of how being a PL enthusiast tends to color one's thoughts).

[1]: https://scattered-thoughts.net/writing/things-unlearned/