I don’t know if you already use Linux or not, but if you do you have a valid excuse for why you can’t help them with their impulse buy from HP. So if they want your help, they can take your suggestions for where to get a Linux computer, such as System76, Framework, and I think even some Dell models come with it preinstalled. There’s probably some I forgot, but the point is, those selling Linux machines are in a growth market that only seems to be accelerating. It should be only a matter of time before more players want a piece of that.
I am literally wrapping up a novel where the protagonist is the antagonist at the same time. I’m not the first one to write such a story of course, but holy shit did I have to work through some internal trauma to write that story to a suitable ending. I understand why many people may not want to bother…
Shun the nonbeliever!
Thanks, I hadn't heard of it yet, but it sounds like a sensible starting point at least! I have some reading to do :)
I think you’re both right. The problem in this discussion is that “justified” really depends on perspective. I agree with the other guy it is justified… from Trump’s perspective. I agree with you it is not justified for the American people.
That’s still a very major achievement! Do I understand correctly this means all target architectures supported by GCC are now unlocked for Rust too?
Well, looking at your example, I think a good case can even be made for it.
“s23” doesn’t look like an HTTP status code, so including it can make total sense. After all, there’s plenty of reasons why you could want custom error codes that don’t really align with HTTP codes, and customised error messages are also a sensible use case for that.
Of course duplicating the actual HTTP status code in your body is just silly. And if you use custom error codes, it often still makes sense to use the closest matching HTTP status code in addition to it (so yeah, I agree the 200 in your example doesn’t make a lot of sense). But neither of those preclude good reasons for custom codes.
Essentially, but it doesn’t roll off the tongue as nicely 😅
So to put it all together
ComplexEnum = Nothing | TaggedU32 | (bool x String)? Is that correct?
Pretty much, yeah. But just be aware the tags are effectively unique constants, so each has only one value. For consistency I would write it as:
ComplexEnum = Nothing | Something(u32) | LotsOfThings(bool x String)
In this notation,Something(u32) could also be written as 1 x u32 because tags are constants.
One major selling point for C++ for new projects is efficiency. People are still skeptical that other languages can truly compete with C++ in that space. For example, people that need low latency (game development, trading, etc.) or are into HPC, may never be convinced to switch away from C++ because of this reason. We still don’t have enough data to argue if another language that provides safety can compete with C++ in this area.
While I can agree we don’t have sufficient data to make hard conclusions on this front, I think there are enough early indications that point to Rust being able to stay on par with or even outperform C++ in this regard:
- Google, Firefox and Microsoft report performance improvements from migration to Rust. Some of this was attributable to having a better understanding of the problem domain upfront, thus giving an opportunity to choose better data structures. But a large part was also because choosing Rust obsoleted the need for other safety techniques that had a higher runtime impact, such as Google’s MiraclePtr or even sandboxing.
- Crypto-traders have already massively adopted Rust as their language of choice, providing evidence the language is fast enough for their use cases. It seems a matter of time before traditional traders make the switch.
- Rust ownership model avoids issues with possible memory aliasing that are inherent in C and C++. This enables compilers to apply optimizations they cannot apply otherwise, leading to higher theoretical throughput. Meanwhile, areas where Rust is theoretically slower (such as mandated bounds checking) are also applicable to C++ whenever safety is prioritized.
Zig is better than C, but still a far stretch from memory safe: https://www.scattered-thoughts.net/writing/how-safe-is-zig/ I think Nim is better because it uses a garbage collector and doesn’t have any pointer arithmetic, but I couldn’t find as much on the topic.
arendjr
0 post score0 comment score
Pretty sure I would keep bumping my head trying to drink from that glass of water 😂