5 ms·
I have several issues with Rust async and prefer to stay as far from it as possible, but "colors" is not one of them. The article correctly mentions that we can
by newpavlov 5y ago
I have several issues with Rust async and prefer to stay as far from it as possible, but "colors" is not one of them. The article correctly mentions that we can view other function properties, like fallibility, as "colors". For a language like Rust it's important to expose such properties (similarly to how it relies on Result instead of using exceptions) since FSM and sequential code are quite different from each other. If anything, I would say that Rust does not go far enough to expose such properties. I would love to have compiler-enforced properties like "can not not panic", "execution takes bounded time", "uses bounded amount of stack space", "does not use allocations", etc. Some of those properties could've been useful for async code as well and the bounded stack usage is in a certain sense already implicitly part of async.
One of my issues is that Rust continues to pile ad hoc solutions, without looking for more fundamental approaches. For example, in the async case, it was rushed in the current form instead of properly solving generators and linear types. Yes, it's probably helped with the language adoption, but it's a short-term win at the expense of the longer-term language health.
- ajuc 5y ago> it's a short-term win at the expense of the longer-term language health. this is how we get the mess that is C++
- dataangel 5y ago> it was rushed in the current form Are you the one withoutboats always chimes in here to correct by pointing out that there was actually tons of discussion and alternative designs evaluated? I seem to remember the last time rust async was discussed here the people who actually worked on the feature being pretty peeved by people claiming this.
- deleted 5y ago[deleted]
- newpavlov 5y agoAlways? If you mean https://news.ycombinator.com/item?id=26406989#26407395 https://news.ycombinator.com/item?id=26406989#26407395, then I don't remember repeating this discussion with him on HN or anywhere else. He took it really personally, so I don't see a point in rehashing it. I stand by my words behind the link and I don't think that I stand "corrected". You can read the HN discussion and github and IRLO discussions linked in it to form your own opinion.