• 0 Posts
  • 6 Comments
Joined 2年前
cake
Cake day: 2023年7月13日

help-circle


  • It certainly does. It’s way simpler to keep up all invariants and to review the few percent lines of code in unsafe blocks than making sure that the 30 million lines of code are free of undefined behavior.

    Is some part of the code it battle tested of course it’s complete unreasonable to rewrite it in any language, but if you have to do a major rewrite anyway or write a new component you should definitely use a memory safe language. And no it doesn’t matter that there is an unsafe escape hatch because it’s literally impossible to write low level kernel stuff or FFI to other languages without unsafe because Rust can’t uphold/guarantee the invariants of the hardware itself or the behavior of other languages.


  • As said it’s possible to edit PDFs but of cause it’s a pain in the ass because that format doesn’t have a lot of semantics information about the original source. PDF doesn’t understand how to reflow text to the next line.

    It’s a bit like having a Photoshop file with many layers, saving the image as PNG, sending that PNG to someone else, they open it in Photoshop and than complain about why Photoshop is trying to prevent the PNG from being edited.

    You can edit the PNG but it’s a pain in the ass because the original layer information is lost. Same with PDF. Nobody ever tried to prevent anyone from trying to edit PDFs but of it’s more that fixing some minor typo is certainly is a pain in the ass because thats not what this format was designed to do.