Reason #18723 why I hate Actix and think the Rust community really should abandon ship on it and work on alternatives like warp, tower, gotham or rocket https://twitter.com/whitequark/status/1217945196400447488 …
-
This Tweet is unavailable.Show this thread
-
Replying to @mgattozzi
It's annoying because the community has gone way overboard with the "no unsafe ever" trend, and I want to be on the maintainer's side. But holy shit their reactions on the issue tracker are ridiculous
2 replies 0 retweets 16 likes -
Replying to @sgrif
Yeah like a little unsafe here and there sure. Necessary stuff, but this maintainer is too dismissive. You'll also love to hear their commit for adding their own custom unsafe cell was merely: "add custom cell"
2 replies 0 retweets 6 likes -
Replying to @mgattozzi
What's frustrating with their style is they clearly don't understand what `unsafe` *means*. "There's no issue because public API doesn't exhibit UB" no that's besides the point. This function has unchecked invariants. Mark it as unsafe and move on
2 replies 0 retweets 5 likes -
Replying to @sgrif @mgattozzi
was the issue here that a public function is not marked unsafe, but contained `unsafe` blocks, but doesn't guarantee the invariants those blocks rely on? I'm still really unsure what forces a function to be marked unsafe
1 reply 0 retweets 1 like -
Replying to @mountain_ghosts @mgattozzi
It was archived, you can see for yourself. http://web.archive.org/web/20200116231317/https://github.com/actix/actix-net/issues/83 … A function should be marked `unsafe` whenever it has invariants that cannot be upheld by the compiler. Whether that is public API or not is irrelevant, requiring `unsafe` to call a function like that is critical
1 reply 0 retweets 1 like -
Replying to @sgrif @mgattozzi
but the compiler doesn't *force* you to mark a function that contains `unsafe { ... }` as `unsafe`, you have to elect to do that? so `unsafe { ... }` is you going "look, I know rustc can't prove this memory use is ok, but trust me I know what I'm doing"
3 replies 0 retweets 1 like
Right. `unsafe fn` is "this function has invariants which must be upheld (ideally well documented, which were not in the function in question). `unsafe { }` means "I have upheld those invariants, trust me". Providing a safe API to an unsafe function is a valid thing to do
-
-
Also if you mark a function as unsafe you don't need unsafe blocks in that function
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.