Re:Rust 1.100.0
by tialaramex on Thursday November 12, 2026 @09:02PM
(#50477141)
C++ doesn't have methods/ "member functions" on the primitive types.
One reason is that C++ doesn't know where to put them, for user defined class, struct or union types these "member functions" as their name suggests live inside the class/ struct/ union definition but for a primitive where would these live?
In Rust they're just impl blocks, for example the method we're discussing here is:
impl bool {
pub const fn toggle(&mut self) {
*self = !*self;
}
}Only because Unified Call Syntax is yet to land into the language, after several failed attempts.
And I think there's a decent chance that it never will, at least in the form it has been proposed in in the past (i.e., member function syntax being effectively turned into free function calls). P3027 "UFCS is a breaking change, of the absolutely worst kind" [0] argues quite strongly that that particular form of UFCS is basically completely broken.
As WG21 goes, it is a matter of advocacy, persistency, and getting the required votes in the room, at least if the process doesn't change even with how C++26 contracts turned out to be.
I mean, sure, but that's basically a tautology since that's how everything made it into the standard into the first place. Those are necessary but not sufficient conditions.
Not really, in first place it was basically CFront 2.0, alongside C++ARM akin to the K&R C book, with last minute addition of HP STL implementation.
The only piece that wasn't really available and was made in a waterfall design approach was export templates, with the known outcome that no one other than EDG has even bothered implementing it.
Post C++98 is when we got into the "advocacy, persistency, and votes" strategy.
You still needed "advocacy, persistency, and votes" to get stuff into C++98. It's just that some things need a lot more of the former to get the latter than others.
Re:Rust 1.100.0
by tialaramex on Friday November 13, 2026 @04:23AM
(#50480606)
I'm with you on this and would point at std::hive as an example of the results.
Primitive types and composite types having the same capabilities is a bit of a value statement for C++ and Rust IMO, and it's missing in a lot of languages downstream (IMO) of the "every variable is a reference to a slot/pointer" philosophy taken by most every managed language