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.

Jump in the discussion.
No email address required.
Notes -
So, you have some good responses and I want to repeat that this is all just my opinion and personal experience. Thanks for the reply.
I won't address your criticism of our design because you don't know the details (and I'm not going into them). But we're not stupid people. Not collectively, at least... :) This attitude of "I've thought for three whole minutes and I can't see why anybody would ever want this, so the people telling me they want this are wrong" is kind of emblematic of Rust's design vs C++'s.
I agree it's nice that Rust solves the aliasing problem. They didn't have to solve it by confusing mutability and exclusivity, though! It's like if a plumber comes and fixes my toilet, but breaks some windows on the way out. The correct response to "hey, why did you break the windows" isn't "look, the toilet's fixed!"
You can if you can access it, yeah, but it'd be weird for the C++ object to give a user access to raw internal pointers. Note that in most cases you're also limited on what methods (including getters/setters) you can call on a "const MyStruct" - whether a function is read-only or not can be explicitly declared in its signature. Now, you don't have to use const at all in a library. Or you could use it but then have the same "internal mutability" as Rust - but why would you do that? The point of the keyword's existence is to allow programmers to positively assert "this is what a read-only version of this object looks like". Which is powerful and important and should be easier than it is in Rust.
If your complaint is that "const" doesn't force the C++ programmer to be safe, you're right about that. C++ gives options, not restrictions, and for bad programmers it is indeed full of footguns. My praise of "const" is due to what it can be in the hands of good programmers - and I would have loved it if Rust introduced the keyword but applied its stringent safety guarantees to it.
But the heap example I give is the exact opposite of this. I want access to the inside type (the number) - I never want to think about the heap's operator except at initialization - but instead I'm being forced to wrap it everywhere. Now, it's not entirely fair to compare Rust's library with C++'s STL. Like you said, "it can be annoying to find gaps like this in the language that takes years to close" - Rust is young, and the STL is the result of decades of finetuning/nitpicking work from thousands of people. I agree that, in the future, something like Rust's bad heap implementation might be a non-problem.
More options
Context Copy link