3 ms·
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
by athrowaway3z 4y ago
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.
- dgb23 4y agoIf 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.
- athrowaway3z 4y agoI 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.
- Karrot_Kream 4y agoNot 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/ https://scattered-thoughts.net/writing/things-unlearned/