3,644 karma · joined Dec 11, 2021 (4y ago) · 662 submissions
comment 1w ago · link · parent
comment 1w ago · link · parent
The answer: dependencies (My compiler has virtually none, intentionally)
Rust has a very small stdlib, so you are forced to bring in dependency crates, and not just a few. Many programs have 50-100 or more, and they all have dependencies, and so on. Contrast with Go where it has a culture of few dependencies, and those project have few dependencies. Your Rust compiler is doing a lot more work for what appears to be the same program as in other langs, but ultimately is a lot more code (typically).
To make matters worse, cargo does a decent job of parallelizing the builds, but it can only do so a) at the crate level b) only as much as the dependency graph allows.
comment 3w ago · link · parent
Update: The one nice thing I noticed is the weight of the 16" is only 4.1lb vs. 4.7lb from the previous model. I guess OLED is a lot lighter. THAT would be nice.
comment 2mo ago · link · parent
Folded, I get, I want it to be a "regular size", but the only reason I don't like big devices is because they are clumsy to store in my pocket and use/grab one handed. If I can use it BOTH ways, now I have a choice. One handed for quick usage, and two handed for extended sessions. For $2K, yeah, I'm going to want a full fledged computer in my pocket.
comment 3mo ago · link · parent
1) Induces a large performance penalty
2) Introduces a GC into C code bases (higher memory requirements, performance profile changes)
3) Is x86-64 only atm I believe
An idiomatic Rust port would have none of these issues, so it would be more a stop gap measure than a long term strategy.
comment 3mo ago · link · parent
Very small nitpick, but AFAIK protovalidate comes from Buf, not Google. While protovalidate DOES work with gRPC via backward compatibility (but also Buf's ConnectRPC), saying "gRPC's protovalidate" probably makes people think it came from Google.
Disclaimer: I have no affiliation with either Buf or Google.
comment 4mo ago · link · parent
Unchecked exceptions lead to unhandled exceptions at runtime. We've all seen screens with Java programs running with tons of exceptions in the log, or worse, that crash with unhandled exceptions. This is the result of the unchecked exceptions mess, which is why I won't use languages that use them for routine error handling for anything more than trivial programs.
comment 4mo ago · link · parent
Sure, GC's are nice which is why so many langs have them, but that removes the deterministic allocation performance which most C/C++ programmers want (and many times need). Why not just use something like Go then? You have a much richer stdlib available out of the box.
comment 4mo ago · link · parent
comment 4mo ago · link · parent
comment 5mo ago · link · parent
Languages use Boehm for exactly one reason: it is easy to shim into an otherwise manual memory system (it was designed for use in C/C++). I mean no respect to its authors, but using Boehm in production is the worst of all worlds: slow allocations (free list allocator), poor cache locality, and not precise (so you can expect memory leaks). If you are going to do a GC language you want: 1) precise 2) bump allocator 3) compacting collector 4) generations. Essentially you want to allocate fast, only touch live objects (most objects die young), compact them for locality, and only process objects each cycle of similar age. There is a huge amount of engineering that goes into a state of the art collector, but those are the basics.
comment 5mo ago · link · parent
That said, there is value in limiting your own unsafe use, and there might be value in limiting unsafe in the crates you use. However, this is really a question of "who do I trust to use unsafe? How much? Under what circumstances?" and NOT "is okay to have any unsafe?" because any useful program will contain a lot of unsafe if traced far enough in its call paths.
comment 5mo ago · link · parent