site banner

Culture War Roundup for the week of March 18, 2024

This weekly roundup thread is intended for all culture war posts. 'Culture war' is vaguely defined, but it basically means controversial issues that fall along set tribal lines. Arguments over culture war issues generate a lot of heat and little light, and few deeply entrenched people ever change their minds. This thread is for voicing opinions and analyzing the state of the discussion while trying to optimize for light over heat.

Optimistically, we think that engaging with people you disagree with is worth your time, and so is being nice! Pessimistically, there are many dynamics that can lead discussions on Culture War topics to become unproductive. There's a human tendency to divide along tribal lines, praising your ingroup and vilifying your outgroup - and if you think you find it easy to criticize your ingroup, then it may be that your outgroup is not who you think it is. Extremists with opposing positions can feed off each other, highlighting each other's worst points to justify their own angry rhetoric, which becomes in turn a new example of bad behavior for the other side to highlight.

We would like to avoid these negative dynamics. Accordingly, we ask that you do not use this thread for waging the Culture War. Examples of waging the Culture War:

  • Shaming.

  • Attempting to 'build consensus' or enforce ideological conformity.

  • Making sweeping generalizations to vilify a group you dislike.

  • Recruiting for a cause.

  • Posting links that could be summarized as 'Boo outgroup!' Basically, if your content is 'Can you believe what Those People did this week?' then you should either refrain from posting, or do some very patient work to contextualize and/or steel-man the relevant viewpoint.

In general, you should argue to understand, not to win. This thread is not territory to be claimed by one group or another; indeed, the aim is to have many different viewpoints represented here. Thus, we also ask that you follow some guidelines:

  • Speak plainly. Avoid sarcasm and mockery. When disagreeing with someone, state your objections explicitly.

  • Be as precise and charitable as you can. Don't paraphrase unflatteringly.

  • Don't imply that someone said something they did not say, even if you think it follows from what they said.

  • Write like everyone is reading and you want them to be included in the discussion.

On an ad hoc basis, the mods will try to compile a list of the best posts/comments from the previous week, posted in Quality Contribution threads and archived at /r/TheThread. You may nominate a comment for this list by clicking on 'report' at the bottom of the post and typing 'Actually a quality contribution' as the report reason.

7
Jump in the discussion.

No email address required.

Allow me to present a more parsimonious explanation of everything we're seeing:

Rust is clearly the systems language of the future. It can be just as fast as C++ and has a much nicer syntax/doesn't have weird idiosyncracies (ok, the last point is debatable). However there are lots and lots of C++/C "dinosaurs" whose livelihoods are going to be threatened were it to lose out in favour of Rust. Thus they need a way to protect themselves (as is only natural) and are trying to at the least slow down the adoption of Rust.

In a bid to do this they've found a feature of rust, namely the fact that it forces you to write good code, presented it as "undesirable" and created a narrative of how rust takes away your "freedoms", thereby aligning themselves to one side of the culture war in a bid to leverage the power of that side to protect their income stream. Nevermind that you can very easily write memory unsafe code in rust by just declaring an unsafe{} block around everything.

It's all the usual ploy of people hating technological progress and advancement because it's coming for their daily bread so they put up spurious blocks and fearmonger to ensure that coin keeps flowing to them.

Rust is clearly the systems language of the future. It can be just as fast as C++ and has a much nicer syntax/doesn't have weird idiosyncracies (ok, the last point is debatable).

I'm not completely sure I buy this vision of the future. Rust has some very good ideas, but there is so much quantity behind legacy C/C++ systems that it has a quality all of its own. And it's not the first time claims like this have been made: I'm old enough to remember Java being sold as "just as fast as C++" and safer (debatably true for some workloads today, less true at the time), but it hasn't displaced C or C++ despite major efforts. And despite the supposed memory safety, I have actually encountered java.lang.NullPointerException in the wild (production code) plenty of times. C# also promised a brave new garbage-collected world. If I were older, I'd probably point to Ada, which was originally developed for the DoD to write safe, modular programs in the late 1970s (IMO an underappreciated language, to be honest) and still gets some use today.

Rust has some good ideas, but fundamentally it seems to be pretty similar to C++ in terms of what the languages want to be. My loose prognostication is that the sheer Borg mass of the C++ ecosystem will learn to interoperate with, embrace, and extend. The C++ committee is clearly steering this direction, and it seems only a matter of time until the base version of the language offers, say, a borrow checker. There has already been plenty of (slow, but steady) motion towards that sort of thing since C++11 (shared_ptr, more recently span). It seems to me only a matter of time before someone posts a patchset for GCC or Clang that adds -Wborrow-checker.

There's something to be said that the current backwards-compatible syntax for modern C++ will get unwieldy, but there has already been public discussion of attempts to make breaking revisions to it: see Sutter's proposal for cppfront. This sort of thing isn't unheard of: early C++ was implemented as a generator for C code. Javascript has all sorts of code compatibility tools, including CoffeeScript, which seems to have fallen out of favor since the JavaScript ECMAScript standards committee decided to start publishing again and making real updates. I just can't see full rewrites in Rust of major application code, but I could find it plausible that the backend object models of the languages will converge until they interoperate fairly seamlessly. Or that C++ absorbs all the good ideas and Rust remains around in a vestigial, nostalgic fashion like Perl or PHP in 2024.

"just as fast as C++" and safer (debatably true for some workloads today, less true at the time), but it hasn't displaced C or C++ despite major efforts

Well, this was a lie, it's not possible to match speed with dynamic compilation and garbage collection. Sun corp. did benchmark cheating. Rust tried to be a better C

And despite the supposed memory safety, I have actually encountered java.lang.NullPointerException

Well, in this part they didn't lie, it's possible to have exception, but unlike C/C++ it is guaranteed to be caught and safely processed. Some C implementations (at least for MS-DOS0 reversed some space to check for null ptr dereferences, the program at exit checked it and if changed, printed error message.

"Within C++, there is a much smaller and cleaner language struggling to get out"

One problem with C++ is that it inherited most of C, which means that the syntax for doing stuff the (unsafe) C way is usually short. Compare a C array declaration to a std::array declaration, for example.

With regard to the borrow checker, I don't think it will be that easy to port to C++. (If it was that easy, people probably would not have invented Rust in the first place.) I am not a Rust programmer, but I think that Rust's system of allowing explicit lifetime annotations might not be that easy to reproduce in C++ (at least without horrible template syntax).

(If it was that easy, people probably would not have invented Rust in the first place.)

C++ is bad not only in memory safety, but also has ugly grammar, no modules, slow compilation speed (and ugly binary operator priority).

There's something to be said that the current backwards-compatible syntax for modern C++ will get unwieldy, but there has already been public discussion of attempts to make breaking revisions to it: see Sutter's proposal for cppfront.

And I think the other main one currently would be google's Carbon, which is an experiment from the google LLVM/clang crowd, from their frustration with the c++ committee's hesitance to do breaking changes. They're trying to use good ideas from Rust and others, in a way that's interoperable with c++ files & libraries. Although I haven't heard much about it lately.

The concept of the unsafe{} block reminds me of the debate around content warnings, ironically.

If you have a system level language, you want the ability to take shortcuts even if the compiler can not verify that they are safe.

C++ has some of these which are explicit (static_cast, reinterpret_cast) and plenty which are implicit (C-style casts, pointer arithmetic, etc).

I suppose that they are kind of similar to content warnings. If you clone a Rust project, you could do a git grep unsafe and will see the ugly underbelly of the project laid bare (or at least the unsafe part of it).

Content warnings are unironically a good thing. They're no different to allergy warnings on food you get from a supermarket.

They often hamstring a good sucker punch twist by foreshadowing what's going to happen before you start the story. If they come packaged with a tagging system like on Archive of Our Own though, where you can search by the most granular of details to find the story you want, I can get behind that.

Or if they're inside a spoiler block, so you can look at them if you want and ignore them otherwise.

I have never written a line of C for pay in my life - but my instinct is to align myself strongly with C, as I would predict based on knowledge of my political commitments and my psychological profile.

In the last instance there is nothing that can extricate itself from that web of shadows and dreams which has long since been assumed to belong exclusively to "an earlier age" - aesthetic considerations, religious sentiments and mythological archetypes, networks of vague and half-realized associations. To ignore this fact is to make the same mistake as the historians, sociologists, and economists who ruthlessly excise the idiosyncratic and biographical in favor of the structural. Their affirmative defense is that they are required to obey the methodology of their field. But it is also plain that it offends their conscience to think that the "irrational" might intrude on the domain of rational inquiry, and that it might require a correspondingly irrational mode of investigation.

I…do not understand where you’re going with this.

That’s not a criticism. I just experienced a physical double-take as I tried to parse your mystical experience.

A shorter version is: people develop emotional attachments to unexpected things, like programming languages. There is no guarantee that these attachments are rooted in economic concerns. Understanding these emotional attachments is important for understanding their behavior.

In my Triessentialism, I identify four sources of value, attributes about things which give them worth to humans and other mammals:

  1. Utility - can it bring me closer to a goal?
  2. Experiences - can it make me feel something I want to feel?
  3. Status - can it improve my esteem among those I want to impress?
  4. Agency - can it make me feel like I can make a choice that matters?

C++ had all four for me when I was in high school, and I don’t see that changing.

Oh. Well said, then.

Rust may or may not be the language of the future. Most industries are still firmly in the past. How could they be otherwise? When your engineers each have 30+ years of experience with a language, they’d stick to it even if every new posting demanded Rust. It was hard enough to wean them off Fortran.

Trend-chasing is for the startups. Do you know how many man-hours my coworkers wasted on a bid to start using Docker? I don’t, because at some ambiguous point they pivoted to Kubernetes. I can’t even tell if that panned out, because the whole R+D program got slashed next time a government budget was delayed.

I’m sure there are lean, hungry teams who started a project with Rust in mind. They’ll all put it on their resumes. As it bubbles up into the general consciousness, chief engineers will start floating it as a process improvement. Then PMs will decide to bid stuff with Rust in there. If the customer doesn’t shoot them down, maybe then you get some products depending on Rust. But that takes time.

I was under the impression that Rust was a language that plenty of programmers liked, but that there are few projects using it, leaving the coders stuck with java or whatever.

Of course, java programmers are probably more plentiful for the foreseeable future than rust programmers, so for projects where the dev costs dominate the runtime costs, sticking to java might actually be correct from a management point of view.

The problem with this theory is that literally no one here has anything against Rust itself.

Also, and I've mentioned this before, while I spent some amount of time dreading the time I become a dinosaur, I am now filled with dread at the distinct lack of young wolves nipping at my heels. I know every older generation complains about the younger one, but surely "what's wrong with the kids today, they seem to be completely unable to replace me" is a new one?

The problem with this theory is that literally no one here has anything against Rust itself.

I have Complaints. In addition to the governance drama, the language has Made Some Tradeoffs.

Compile time remains a pain in the ass, especially on lighter-weight machines. It's strict enough to be obnoxious when writing casual code or projects small enough to hold a coherent mental model around, but not strict enough to avoid unintentional side effects or for crate-internal multithreading to be truly safe. Struct auto-management is one of those things that's really clever and also a giant footgun for portability, consistency, reliability, and just understanding wtf is going on with your data: any time you leave your own application (even to local disk!), any default (non-#[repr(C)]) struct should be treated like a dumb tuple.

((I'm also annoyed that match doesn't support case fallthrough, but I'm probably one of a handful of people on the planet that thinks that's a good idea. For other nitpicks, they missed a perfectly good opportunity to have different symbols for integer and floating-point division.))

Embedded Rust is getting better, but it's still sketchy, even on well-known and well-supported architectures and chips. To be fair, that's one of the hardest environments and the most important for all that no-mutable-shared-state safety that Rust is really trying to enforce; to be less fair, you end up with tutorials for the microcontroller equivalent of hello world that look like this and this.

It's better than Go, and I've dabbled with it; these might not even be things that can be solved (uh, except compile time; it has gotten better). But the treatment of the language as an end-all be-all overlooks a lot of the real-world experience of working with it outside of data centers.

Huh, I have complaints about rust but they're very different.

I haven't used a 'lighter-weight machine' in at least half a decade, and if I had to I'd just compile in the cloud. I just use serde any time a struct leaves memory and that's fine, and when I need threads I just use a very limited and safe abstraction - rust gives you a lot of power but you don't have to use it.

The thing I don't like about rust is ... Rust has a lot of great features, so I end up using it a lot. And for 80% of the code I write, I'm not writing tokio internals or something that needs to get the last 15% of possible performance, so I really do not care about the difference between String and &str, lifetimes, cloning, lambda mutability and capturing, not being able to pass an immutable reference to a state object around while i have a mutable reference to a child of it, there being &s everywhere because half of the methods on containers take references and half take values, ... It just takes mental effort that should be spent elsewhere. I think for people with lower g these are bigger problems, but I have a good grasp of all of them. But I'd still much rather not.

These are just a bunch of papercuts - they're pretty annoying, but all of the good parts of rust more than compensate for it. I often wish I were using a smaller rust, though. Recently some of the early rust contributors started trying to make a language like that, although the base rates on success are very low and I have some problems with the initial approach.

That's your feeling? Maybe I'm a mediocritie but I can name quite a few folks under me who, with a button up and some experience presenting (ExECuTiVe PrEsEnCe), are great substitutes.

I'm sure there's plenty of talented young guys that would beat my ass in the grand scheme of things, but the supply / demand seems to result in remarkably little fire under my ass for the time being. I might regret those words at some point, but that's how it feels like so far.

Nah, that’s common enough among boomer engineers.