5 ms·
> People waste time on trivialities that will never make a difference. Depending on the situation, memory layout could be trivial (copying 200 bytes once at st
by henning 2y ago
> People waste time on trivialities that will never make a difference.
Depending on the situation, memory layout could be trivial (copying 200 bytes once at startup vs. not in a way that should never be user-perceptible and difficult to even measure) or actually a big deal (chasing down pointers upon pointers in a tight inner loop). It's entirely situational. To dismiss all of that as "trivial" and saying it will "never" make a difference is not helpful. There are a lot of shitty apps that are impossible to get running reasonably without a total rewrite and their shitty use of memory is part of that.
- andrepd 2y agoThinking like that is how we get 12MB of javascript to read a news article, or mobile apps that are jankier than Word 97. I don't get how someone can criticise a systems programming language by saying "I have to think about memory layout"....
- bachmeier 2y agoThere's a response to your comment in the post: > I feel like Rust is self-defined as a “systems” language, but it’s being used to write web apps and command-line tools and all sorts of things. > This is a little disappointing, but also predictable: the more successful your language, the more people will use your language for things it wasn’t intended for. > This post still offends many who have tied Rust to their identity, but that’s their problem, not mine.
- mwcampbell 2y agoI think maybe the GP's point is that we should use systems languages, with their focus on efficiency, for things that the OP defines as out of scope, as an antidote to the creeping software bloat that we all like to complain about from time to time. And let's not forget that Word 97 felt bloated in its day, however fondly we may look back on it now.
- hyperbrainer 2y agoCriticising a systems programming language for needing to manually manage memory is honestly embarrassing.
- IgorPartola 2y agoI mean to be fair so is using a systems programming language for every use case under the sun. If Rust is a great systems programming language that’s one thing. If it’s a general purpose language that’s another.
- hyperbrainer 2y agoThe two are not mutually exclusive. Also, I don't think I have ever needed to actively think about memory management more than .clone() and static for any hobby project I have undertaken. All the ML-like features like sum types, pattern matching etc. add great value. Cargo too. So, it is a great general purpose programming language. But blaming it as too low-level or similar despite choosing it is obtuse at best.
- keybored 2y agoA lot of git(1) subcommands were originally written in shell or Perl. Now most are written in C. Through many decades people wrote utilities and applications in C. Not hardcore lower-level kernel modules. Just utilities and applications. Because that’s what they wanted to write them in. Over Perl or Java or whatever else the alternatives were. What’s more C than that? Writing everything short of scripts in it? Now people write applications in a modern programming language with modern affordances. They might be working uphill to a degree but they could have chosen much less ergonomic options. The embarrassing part is criticizing people who have put in the work, not on the merits of their work, but on… having put in too much work.
- tptacek 2y agoThe subtext is that most of the time it won't make a difference, and Rust demands that you consider it every of the time. That squares with my experience. The powerful argument Rust has is that in the hotspots where memory lifecycle and layout make a huge difference to programs, it's much easier to express the fast and predictable memory arrangement than in GC'd languages.