Re:The struggle with Rust
by AstralStorm on Wednesday January 25, 2017 @03:39AM
(#13479783)
Or better extend the language to allow making code partially safe in many ways. This would make the wrappers much better.
Make it easy to reason about useful kinds of partial safety. Make it easier to define properties of external systems that Rust does not control.
I have pushed this several times in the past, but there's always been a lot of resistance to the idea. Though I've always phrased it as "let's allow the safety checks to be turned off", which isn't necessarily the best phrasing...
I wonder if it'd be better to just push to make unsafe easier to use: add sugar for ptr::offset, add a -> operator, relax the restrictions on casts, and so on. When I do OpenGL programming in Rust I drop into unsafe quite regularly, and it feels just like C, except for some annoying papercuts. It'd be nice to get rid of those papercuts.