Hiker, software engineer (primarily C++, Java, and Python), Minecraft modder, hunter (of the Hunt Showdown variety), biker, adoptive Akronite, and general doer of assorted things.

  • 0 Posts
  • 7 Comments
Joined 2 years ago
cake
Cake day: August 10th, 2023

help-circle
  • But they are not the default option. And your new job may not use them.

    Who cares if it’s the default? If it’s the best tool, use it.

    It’s silly to have a reason for “going Rust” be the build system, especially in the context of something as new as a WASM context where basically any project is going to be green field or green field adjacent.

    Exceptions is a non standard exit point. And by “non standard” I’m not talking about the language but about its surprise appearance not specified in the prototype. Calling double foo(); you don’t know if you should try/catch it, against which exceptions, is it an internal function that may throw 10 level deep ?

    And that’s a feature not a bug; it gets incredibly tedious to unwrap or forward manually at every level.

    By contrast fn foo() -> Result<f64, Error> in rRst tell you the function may fail. You can inspect the error type if you want to handle it. But the true power of Result in Rust (and Option) is that you have a lot of ergonomic ways to handle the bad case and you are forced to plan for it so you cannot use a bad value thinking it’s good:

    You can do this in C++ https://en.cppreference.com/w/cpp/utility/expected (and as I said, if you feel so inclined, turn off exceptions entirely); it’s just not the “usual” way of doing things.



    1. It’s statically compiled and isn’t dependent on system binaries and won’t break if there if the system has the wrong version like C/C++, allowing you to distribute it as a single binary without any other installation steps

    You can do that with C++ too.

    1. Still produces fairly small binaries unlike languages like Java or C# (because of the VM)

    I mean, the jars are actually pretty small; but also I really don’t get the storage argument. I mean we live in a world where people happily download a 600 MB discord client.

    1. Is a modern language with a good build system (It’s like night and day compared to CMake)

    Meson exists … as do others.

    1. And I just like how the language works (errors as values etc.)

    Fair enough; though why? What’s wrong with exceptions?

    I work in a code base where I can’t use exceptions because certain customers can’t use exceptions, and I regularly wish I could because errors as values is so tedious.





  • I don’t think the US Govt backdoors phones anymore … mostly because they don’t need to. They find other ways to get the information, like warrantless surveillance of Google and Apple notification servers.

    The other reason I don’t think it happens is that there are just too many security researchers trying to find exploits and backdoors. Also it’s pretty well known that any backdoor can be used against you. The NSA has an interest in domestic phones being secure.

    Granted, international models might have some alterations/backdoors… Even then, that would be egg on the face that they don’t really need if they got caught with a backdoor that applied only to international phones.