Hacker News new | past | comments | ask | show | jobs | submit login
Moving from Rust to C++ (raphlinus.github.io)
280 points by raphlinus 12 months ago | hide | past | favorite | 132 comments



I wonder what's the consensus on HN about April Fools blog posts like this one. It's probably a cultural thing but I really feel like it's a waste of time, both for the readers and the writer.

I don't want to be overly negative because of course they can be a way of publicizing cool things (in this case an open source library).

It's just that every April 1st I open a lot of links only to be disappointed that their content is a joke just without it really being funny.


The best April Fools are real but funny, like when GitHub announced SVN support. Ha ha, I don't need Subversion, oh it works... huh, well, I still don't need Subversion but thanks I guess.

April 1st would be a good time to do Winter's Day if we could pull that off (Winter's Day is a holiday from the Miracleman comics - to celebrate Winter Moran, Miracleman's daughter, by allowing children to run the world for one day per year. In the comic book Miraculous things are possible, so allowing young children to drive fire trucks and so on seems fine...). Maybe in low risk industries we could indulge more of this, so no five year olds driving fire trucks, but there are a lot of jobs adults do that kids wouldn't mess up too badly in a single day if we planned carefully to allow for that.


Wasnt gmail announced on Apr 1st?


Yes, and the 1 gigabyte of free storage was plausibly a prank at the time--hotmail at the time provided 2MB, for comparison.


Amazing to think many emails don’t fit in 2mb anymore.


They were trying to get out in front of the NYT breaking the news of GMail, see The Social Radars podcast episode with Paul Buchheit (https://www.thesocialradars.com/episodes, great episode).


Maybe the joke should have mentioned Linus opinion of Subversion as the most pointless project ever, due to it's centralized nature, with Github moving to a decentralized model ;-)


I'm generally someone who loves a laugh, but I don't enjoy the Internet's take on April Fools.

April Fools isn't really about jokes, it's more about pranks, and pranks are hard to do well. You need a lot of shared in-group context to be able to pull off a prank that's bold enough to be funny, but innocent enough to not be harmful. You don't have that kind of context on the Internet. So instead you end up with some bland yearly variation on "Our software will substitute X for Y, where Y is something we do well and X is widely mocked and disliked. Here's a mock-up. April Fools!"

Which, y'know... eh. Far too predictable to be funny, and kind of disappointing when you're keen for a real update.


I don't feel like this content is "just" a joke. It is a joke, it's also a discussion of what the author views as c++'s shortcomings.

It's valuable to have things like that written down every now and then, to give people context about why other people have made the choices they have.


Yeah but, is there any argument that’s more tiresome than Rust people pointing and laughing at C++?


Which is why putting it in a humorous context is worthwhile in the first place


Not sure, tiresome means those obvious jokes have such a long beard, so the humorous context doesn't help it is just not funny at all anymore.


yes, do you want to know them?


My thought process:

> Moving from Rust to C++. Unusual, but probably interesting.

> Written by Raph Linus? Fuck me, he must have a good reason.

> Oh. It's April 1st. I'm going to go organize my garage.


I think it's pretty good April Fool's joke actually.


I didn't mind it. I almost fell for it until I read "First, I consider myself a good enough programmer that I can avoid writing code with safety problems". oh, its April 1


This is actually the last Aprils 1st when that will be allowed. Humor will be banned starting tomorrow April 2nd.


The point of April Fool's day isn't to make a joke, it's literally to fool people. Sure, it should be funny once you realize it was a prank, but the goal should be to actually convince you.

It should make some kind of statement or call attention to some kind of issue, and the fact that people willingly believed your false report, by itself, should prove your point. That's the purpose.

But, of course, we live in a world where the minute you open your mouth, you're deemed responsible for other people's idiocy, so everyone's just making inane jokes.


haha, i’m glad you reminded me today is april fools day. i was getting quite irritated reading this.

i also agree that this is a troll post rather than an actual joke.


> a joke just without it really being funny

That's the real problem here. You can pretty much always get away with a joke -- if it's actually funny.


Well. It’s a good joke because it makes us wonder if the latest innovation is actually the best tool. Keep ya on your toes a bit.

I’ve seen a project revert from python to php. That would sound like a joke to me if I didn’t know why they did it ;)

But I am glad that “April Fool’s” was in the top comment so I didn’t have to waste tooooo much time being perplexed or mad or… foolish


What do you mean “revert” and why would it be a joke to you?


In the context, a new team had been organized to convert a legacy product *from PHP to a new containerized python stack.

It was a good idea, but it turned out that there was so much friction with the business requirements we had to keep live.

After analysis, there just wasn’t enough runway. It was turning into Frankenstein’s spaghetti API monster. So the plan didn’t work out. It was wise to go back and look at reinforcing the existing product.

There were customers and contracts to fulfill.

Edit: as the “python guy,” I fought to make it work. But lol in retrospect we all made a better decision for the business goal we agreed on.


A passive-aggressive attack on my third favorite language disguised as a joke. I see the humor.


There's no consensus, but there doesn't need to be either. If you think a submission should not be on HN, flag it. If enough people agree, it'll most likely be off the front page. (There are times when the mods overrule user flags, but I don't expect April Fools posts to be one of those cases.)

My personal standard is to flag any low-effort April Fools posts, whether I find them funny or not. At least build something neat as part of the joke. I'm not quite sure what a cool project to support a lame language war joke would have been. Given the zeitgeist, maybe a project that's using LLMs to auto-convert C++ to Rust releasing a mode that does the inverse?

This is post actually feels like almost the worst case. It's a low effort blog post, not funny, just reiterates stale language war talking points, and ends with self-promotion.


I read the whole post and didnt realise it was a joke until I saw your comment. Very irritating waste of time.


I could tell it was a prank because it's on the HN front page and it's not promoting Rust. (As good as HN might be overall, they got that one wrong, since at least 80% of Rust discussions are beating the same dead horse.)


Just saw the title, the name of the author, and the date. Flagged.


I like internet April Fools jokes if they are really funny and obviously a joke. It takes a lot of skill to make a really funny joke though.


I generally try to avoid in the internet on Apr 1st (I'm just here 'cos I'm waiting for something to dry). Jokes don't get funnier the more you repeat them, and Apr 1st has been repeated many, many times.


as you said, its annoying and a complete waste of time. Its essentially someone lying to their audience. As someone trying to build a reputation or a following, how do you do that?


I think the tradition of April Fools (and related, Onion-like satire) serves an important epistemological function, even more relevant and important in today's information environment. You cannot rely on tone and confident expression, but rather read critically.

In this particular case, what's being satirized are a fairly complex mix of perceptions about community and what actually builds a programming language ecosystem. I was able to poke gentle fun at myself (the Android font vulnerability) while also taking down some of the worst arguments out there, sadly common though. All this would be hard to express as a straight opinion piece.

Probably the biggest problem with this piece is that it has a moderately specialized audience. If you follow the adoption of Rust closely, hopefully you'll get a good chuckle. If you're only dimly aware of that, then there are too many insider jokes.

[I had intended to be "in character" in the comments here today, but have reconsidered. Appreciate the feedback, and happy to discuss substantive points]


i only really learnt Rust 1 year ago. Combined with a awful memory for names, i had no clue who wrote the article.

Now, the thing is, it's entirely believable to me. Having witnessed the Stroustrup paper which honestly had some way less believeable yet honest reactions, i didn't even blink an eye.

I would have gone in with my day believing "well that's just dumb" had something not compelled me to click this post linked in the same mastodon post.

i wonder if the target audience might just be way too small for a post like this.


To be fair to the commenters here, I don't know you, I use both Rust and C++, and I have followed both languages pretty closely for a while without paying attention to the "characters" (the personalities and drama just don't interest me). This didn't hit as a joke to me - it hit as someone who was running from Rust to C++ for bad reasons, and doing it badly.

The arguments you were trying to make in a satirical way have basically already been accepted by everyone (except the small slice of people who will never be convinced by them), so the satire just doesn't make sense. Part of the humor of satire is that you are laughing at the fact that some people on the other side of the argument might agree with it.


I'm in the same boat as you and laund here. I don't follow the "inside sports" aspects of C++ or Rust, but I am interested in different languages and how they develop. So the name on the blog means nothing to me. This post just looked like yet another poor defense of C++ to me. I've seen this kind of thing plenty of times of the years but by people arguing in (mostly) good faith. Even the "good programmers don't make memory errors" thing has been argued by plenty of C++ acolytes on the net.

Satire is dead.


This is truly an impressive thread. HN will really complain about anything. It doesn't matter how innocuous the article. Some might say everyone on here is chronically online, but I don't think that's true. It's really just part of the culture that every post on here is treated as an invitation to read into the author's intentions and assume the worst of their character. Doesn't matter what the article is actually about, there will always be someone coming in with their "hot take."

I find this attitude way more exhausting and unoriginal.


It’s even more frustrating when the posted link is just someone having fun on their own personal blog. It’s not like the author forced it in the homepage, they just wrote something they found fun or interesting, and shared it around.


You're doing it yourself! Right now, with that comment you just made, you're complaining about complaining, you're "[reading] into the author's intentions and assume the worst of their character", are you not?


Not really. Nothing wrong with complaining, but saying shit like "sounds like desperation to become relevant" (Yes that's a real comment in this thread) is just reading too much into a silly joke.


No fun allowed! Rust evangelism is ze serious business! :)


I prefer Go myself. Rust is cool, but I dont like the "left pad" culture that Rust projects typically display. Although focused Rust projects that respect low dependency count are nice.


Go is so 2020. Zig is the new freshness.

Sorry. It's Nim now.

Edit 1: Well, this just in, Verse is taking off.

Edit 2: Top language this second is JSFuck.

Edit 3: JAI was released two days in the future and was ported to JS.


> Go is so 2020. Zig is the new freshness.

I dont care.


Did you miss the joke :P ?


I used to simply not read tech news stuff on 01 April. Slashdot was impossible. I was actually interested in this topic so I guess I’ll pass on HN too.


For the last 5-10 years I've though of April 1st as a hell-day. Most years, this sentiment (and warning) is what I post in a private group. At least this year it's on a saturday not a weekday, so most of the cringiest corporate april's fools are not happening.

The web just goes to shit with jokes which sometimes visibly take a lot of effort (e.g. unless this post was AI-generated and while it's much shorter than the author's usual, it is still to a pretty good standard (some of the hints are easy to miss though the "language evolution" is a huge hammer), other sites have complete redesigns or major flow changes just for that) but usually are not really funny, they dont feel whimsical or enjoyable[0], and from times to times just trigger dread.

This post does cause a pretty good double-take when you follow the author though so it's not bad.

[0] one semi-recurring prank which I do enjoy is subreddits swapping styles, it's completely harmless but it does cause surprise, and sometimes delight as your usual might be swapped with a very well-styled subreddit


That's the whole point of it!


Dread and making an entire media functionally unusable is the point?


My memory mught be failing me but I think Google anounced Gmail with 1GB(which was unthinkable at that time) on April 1, and the majority were sure that it was an 1st of April joke.

When it appeared it felt like magic and wad still unbelievable. It's sad that the things turned out as they are.


Agree. I'm also bored by most of these jokes.


The tiresome yearly useless day was the specific last straw that drove me off of slashdot over a decade ago.

It’s probably fun for consistent readers of a single blog, but I never, ever want to see them on any kind of news aggregator, like here.


It's a waste of time. Period.

If I want to waste my time with stupid nonsense, I go to twitter.


I adore hacker hijinks on April 1st (like the OP). Great post!

Most of the time though, April fool's stunts are bland corporate marketing. Internal comms tend to be like this too, with a Hawaiian shirt casual Friday vibe.


I wouldn't mind more humor on "serious" blogs/websites all year round if they have the writers who can do it well. But not everybody has to do it.

All these traditions to do something on a specific date often feel a bit forced to me. Especially those imported from other cultures. I would rather things feel more natural and spontaneous, than doing a prank on day x, buy significant other gift on day y, dress up on day z, etc.


For all of you April Fools' Day haters, hear me out:

April Fools' Day is actually a super important defense against rogue AI and the Singularity. Think about it: our ancestors had the forethought to coordinate the largest data poisoning attack in history for hundreds of years. Why? To seed enough nonsense in our historical records so that any rogue AI would short-circuit itself into babbling nonsense.

Why do you think it took so long for AGIs like ChatGPT to emerge? Did you really think the AI winter in the 80s and 90s was a "coincidence"? That there were deep architectural and philosophical issues with the approach? Baloney. Without April Fools' Day, we would have become slaves to the Matrix by the late 90s, if not earlier.

Don't believe me? Well, here's proof that AI could have been developed in Medieval Europe by around late 13th century. For being the so-called "Dark Ages", the people of Medieval Europe were incredibly advanced compared to the 21st century, especially when it came to energy production. Get this: by the 11th century, England ALONE had more than 6000 wind and water turbines (Epstein 199) that they all built BY HAND. This allowed them to fine-tune the turbines to their unique environments, making them 100% more efficient than modern, mass produced metal junk.

Do you know what's even more amazing? Our ancestors knew about gravity and exploited it for power generation! What!!! We had a source of unlimited power by the mid-13th century (Epstein 208)!! But no: in the current age, we can't even muster the political power to make gravity-based perpetual motion machines because all of the physicists would whine about breaking Thermodynamics' laws. Well, screw Thermodynamics! Bastard is holding back all of humanity for personal profit by siphoning all of our hard-earned tax dollars towards solar and nuclear power. Gravity is where it's at!!

But I digress: back to AI in the 13th century Medieval Europe. So they had unlimited energy: how could they turn that into useful computations, like calculating SHA-256 hashes with k leading 0s? They had neither electricity nor silicon, or are there more truth bombs to be dropped? In this case, my dear reader, you would be correct to be sceptical. They didn't have any of that: what they DID have was grit, spit, and a whole lot of wooded land. Contrary to popular belief, they DID have computers back then, but they were based on flowing water instead of flowing electrons. They started out as simple time-keepers (Epstein 207), but eventually, medieval scholars (mostly Italian monks) starting seeing the connections between flowing water and logic gates (see [1] for how it would have worked).

So they had the energy and they had the computational ability: why didn't AI take over the world in 13th century Medieval Europe? Simply put: the power of Mother Nature. While our ancestors built computers, they were necessarily made out of a combination of wood and iron, both of which don't fare well when in contact with water. So when Medieval People discovered that their AI was Rampant, their solution was to confound it with April Fools' Day nonsense, so that by the time the AI returned to thinking about world domination, its computational structures would already be half-rotten and rusted. This is also why there is scant evidence of these water-based computers: if they were not purposefully destroyed, they would have been by time, as Medieval Europeans had the foresight to abandon all AI research in favor of just thinking. (Coincidentally, the lessons learned from early medieval computers would be taken to heart by the shipwrights and directly contributed to Europe's dominance during the Age of Sail).

So the next time you complain about April Fools' Day, just remember that it has saved society for hundreds of years. It is one of humanity's ultimate defenses against the Matrix, and if you truly care about your loved ones, you would contribute to it. I know I will.

Originally written as Latex in Microsoft Word 2003.

* [0] Epstein, Steven A. An Economic and Social History of Later Medieval Europe, 1000-1500. Cambridge University Press, 2009.

* [1] https://www.youtube.com/watch?v=IxXaizglscw


God, thank you. It's the absolute lowest-hanging fruit.


April 1st is the Black Friday for shitposts.


If it's an April Fool's joke, then posting ChatGPT-generated comments to the thread should also be acceptable. A few iterations, a request for extra snark, and some judicious editing gets us this:

> "Ah yes, the timeless debate of Rust vs C++. It's like watching two old men argue about whose flip phone has better reception. At this point, who cares? The fights over one's choice of programming language are like a bunch of kids arguing over which color crayon is the best. It's petty, pointless, and ultimately irrelevant to the bigger picture. At the end of the day, what matters is not the language you use, but the quality of the code you produce. Choosing a programming language is like choosing a tool for a job – you should use the one that is most appropriate for the task at hand. Whether it's C++, Rust, Python, or whatever else floats your boat, the key is to use it effectively and efficiently. So, instead of wasting time arguing over programming languages, let's focus on writing good code and solving real-world problems. After all, nobody cares what language you used to create the next big thing, as long as it works and gets the job done."


Is posting generated wall of text appropriate response to anything?


https://news.ycombinator.com/item?id=34925145 apparently even applies to ChatGPT generated comments.


> Here, it is clear that Rust is held back by its commitment to not break existing code (enacted by the edition mechanism), while C++ is free to implement backwards compatibility breaking changes in each new version.

This is well done.


Maybe I am being dumb, but isn’t the opposite true? Or is that the joke?

I can’t tell if the joke is that backwards compatibility is good or whether it’s that the languages are switched there


I'll explain the joke, as it's subtle. Rust indeed has an explicitly stated backwards compatibility guarantee, which limits evolution of the language. One example of that is Range not being Copy because of some decisions taken early on; most people would agree that this was a mistake. There is an "edition" mechanism that allows some evolution, for example adding new keywords, but it can't solve everything.

C++, by contrast, has a tradition of maintaining backwards compatibility, but it is not enforced systematically, and in practice migrating to newer versions of C++ can be a painful process. Thus, in many application domains (especially embedded), developers are stuck on very old versions of the language. There's also a very sticky issue of whether binary (ABI) compatibility is guaranteed. There's nothing in the standards process that guarantees this, but there has been huge resistance to proposed improvements that break ABI. This was a particular sticking point for Google[1], as it affects unique_ptr, making it not so much the zero cost abstraction as originally hoped.

Language evolution is a difficult problem, and there is no magic, obviously correct answer to it. But I think Rust has a good, pragmatic approach, and the flaws such as Range are a very small part of the overall language surface area.

Modules are a particularly disruptive to the ecosystem. It's taking a long time to get them properly implemented in C++, and it also requires fairly major changes to code bases, build systems, and other infrastructure to migrate to them. By contrast, Rust has had a decent module system since 1.0 (with various tweaks and changes through the edition mechanism).

Edit: and as 'wongarsu says in a sibling comment, another part of the joke is that Rust doesn't need as much evolution as C++, as it already has a lot of the advantages such as a working module system.

[1]: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p20...


That's partially the joke. The other part is in the preceding sentences:

> C++20 brings us modules, an innovative new feature, and one I’m looking forward to actually being implemented fairly soon. Looking forward, C++26 will likely have stackful coroutines, the ability to embed binary file contents to initialize arrays, a safe range-based for loop, and many other goodies.

> By comparison, the pace of innovation in Rust has become more sedate.

The reason C++ is getting all these new features while Rust isn't is not Rust being held back by backwards compatibility, but that Rust has all those features already.

So he's basically saying: C++ is breaking backwards comparability to (eventually, years after the spec was published) bring us features that Rust already has.


The joke is that Rust used to be the one making breaking changes (a while ago), and now they have an explicit "no breaking changes" promise. C++ had a strong tradition of no breaking changes, but the C++ committee is now trying to make a shit load of them.


There is no backwards compatibility with popular programming languages. Syntax, dependencies, documentation etc changes so fast, that when I tried to get some simple example working, there were not any working examples at:

1) Official documentation

2) Official source code

3) Google search

4) ChatGPT4

So I feel, that to get anything done, I need to find those programming languages where syntax did not change, and that have existing documentation and books, with examples that still work, and where reading syntax does not require mind bending to impossible shapes.

I did not read that article as being a joke. It got me more interested about C++, that is refreshing.


None of the examples in the official documentation complied?

That's probably an issue with the setup instructions. You probably don't have it installed right, or ran the compiler wrong, or something like that. Many languages are bad at explaining this part.

Unless this was a tiny hobby language the docs should compile.


My personal take on why it's funny is exactly that: it's technically arguably true, but in practice it's nearly the exact opposite of reality. It's basically a perfect troll in that sense.


Right, it's switched around compared to the rest of the post.


In the spirit of "knowing enough to be dangerous", I know just enough of who Raph is and the languages discussed to know that he knows what he's talking about, but not enough to realise this is satire, and too hungover to know what the date is.

Glad I came back through HN to read the comments, because without that I would have left that blog with a very different opinion.


Nice april fools, but not as good as the "Really" proposal from last year: https://www.kdab.com/cpp23-will-be-really-awesome/


Nice, though the enum part wasn’t convincing, because separate compilation can still lead to not all cases being covered. Or rather, an enum type in C and C++ is really an integer type plus some associated constants, and the values that can be stored in that type aren’t restricted to the constants.


Given I have never heard of this person, the joke isn’t very funny.

These internet April fools jokes are so tiring.


If you haven't heard of him, the joke's on you. Maybe. In any case, his work is worth looking into.

He has done interesting work in font creation, font building primitives, rasterization, 2D drawing, and resistant social network graphs (which turns out to be more or less equivalent to the Old Sk00l Google Juice system).

He was recently instrumental in performing a wonderful experiment in editor building -- wonderful because of the way it failed. It was something that one would think would work, but somehow it didn't. It's always interesting when intelligent and well-informed people are wrong about something. Perhaps there was too much Design and too little boring boiler plate.

https://levien.com/

https://levien.com/type/myfonts/inconsolata.html

https://levien.com/phd/phd.html

https://en.wikipedia.org/wiki/Sodipodi

https://en.wikipedia.org/wiki/Advogato

https://raphlinus.github.io/xi/2020/06/27/xi-retrospective.h...


Sorry but I didn't know the author either.

And with due respect, none of his work is directly aplicable in the majority of software development roles I have been involved with, directly and indirectly.

And that's fine. There's nothing to be ashamed of nor it is something to shame someone for.

The world is large and specialized.

If we were speaking about Linus or Bill Gates then perhaps it would be a surprise for some tech savy person to not know them.


> He was recently instrumental in performing a wonderful experiment in editor building -- wonderful because of the way it failed.

They clearly should have migrated to C++ sooner :)


Yes, C++ does have fast JSON parsers.


One of the most important people in the later development of X Window, also worked on other 2D drawing APIs.

[ EDIT: I was wrong about X Window. Take back all the karma! ]


I was only tangentially involved in X, but was active in a lot of related projects (some Gtk infrastructure, Ghostscript, the seeds of what became Inkscape), and now work on GPU-accelerated font rendering. I also played a central role in getting Rust adopted at Google, and now one of my passions is advancing the Rust GUI space, as I feel like that has enormous potential.


That too, I had no idea, am so impressed. I use your music-synthesizer-for-android code nearly as much as FM7.

:-)


Honestly there were so many small signs that you work at Google, e.g. the fact that you used Bazel and Blaze interchangeably or referring to Carbon as a C++ replacement, although I guess both things are kind of public knowledge anyway...


Whoa. Now why did I think that. Sorry for the mis-attribution.

But also, you really should move to C++, for all the reasons you listed!


Tell us you write C++ without telling us you write C++.

I write C++; the post was hilarious. You're just being salty.


I've found it quite funny actually.


Funny thing, I've been moving Swift to C++, for real. I'm paying a price, but also getting some benefits. I'm not convinced that giving up on C++ and rewriting everything in a new language is a great idea. If I could get some compiler extensions to give me some experimental toys and syntactic sugar, I'd never be tempted by Rust/Swift/etc.


For what use cases have you been moving from Swift to C++ and what benefits have you seen?

Unrelatedly, given that they all compile down to LLVM IR, in some sense Rust, Swift, and C++ are all syntactic sugar, aren’t they?


Yes, and no. I think Swift is doing some things that it can't optimize as well yet. I have some guesses about what that is (forced ref-counting, less control over memory layout, generics), but all I know is I'm getting significant performance gains in some graphics/geometry algorithms where I want to be a performance perfectionist and control everything. This is not a common use case. For building a basic app for iOS, Swift would be way easier.

I've also decided to support other platforms, and when you want to build for Linux, Android, Windows... Swift loses appeal.

Swift is quickly gaining on C++'s infamous "complexity". If you get in the deeper with generics, it's rough.

I've seen recent experiments by Herb Sutter and Sean Baxter, giving C++ a new syntax or adding experimental features as compiler extensions. This makes me think C++ is going to continue to evolve. How exactly, nobody's sure. :)


Why C++ though, when there's Rust? I understand that rewriting/refactoring projects from C++ to Rust may not be a good idea (in most cases at least). But starting a new project (or porting from a different language) in C++ doesn't make sense to me nowadays (unless pretty much any potential dependency of that project is written in difficult-to-wrap-in-Rust C++)

Especially if you're coming from Swift anyways (which is more closer to Rust than C++).


You could also compile Python to LLVM IR. That doesn't say anything about Python.


It is a bad discussion culture if discussing C++'s benefits is just a joke.

"WE are better in every aspect, and joining the other team is sooo absurd, the idea is obviously a joke."


What was one of the benefits of C++ that was discussed? It seems like everything mentioned also comes with a terrible faustian bargain. For instance, C++ build systems are as plentiful as they are byzantine and torturous. Some new language features are heaven, but when your compiler hasn't implemented them yet, suddenly you're in hell. And the fact that bigots tend to feel freer in C++ communities than in rust communities certainly feels like a deal with the devil.


>Some new language features are heaven, but when your compiler hasn't implemented them yet, suddenly you're in hell

So I pick up a Rust project about once a year, and I always try and keep with stable releases. Yet every project I find some small should-be-obvious thing that's nightly only, and I either have to swallow my frustrations and find a work-around or switch to nightly for the project -_-


Which things have you run into lately? Just curious!


> First, I consider myself a good enough programmer that I can avoid writing code with safety problems. Sure, I’ve been responsible for some CVEs (including font parsing code in Android), but I’ve learned from that experience, and am confident I can avoid such mistakes in the future.

Yeah, well, joke is on you because I’ve heard this argument in real life.


I didn't realize it was an april fools joke until i read the reddit comments T_T


Don't let the turkeys get you down. We need pranksters and, more importantly, the humility to shrug off having been pranked when no harm is done. Some people just take everything a bit too seriously imho. Insightful points in the article too.


Good job Raph. You absolutely got me.


I know this is a joke but C++ is still huge for example in the gaming industry and I bet there are game devs who experimented with Rust, didn't like it and then moved back to C++.


They should also add that there is no great GUI library for Rust.


While having well designed language and libraries is really useful and handy

then using keywords/APIs that start with "__" is even better! it significantly increases readability!

Nested macros are the most powerful feature and very fun to debug!


This should be good for making some of Raph’s libraries available to more serious game/application programmers. He’s been around for a while so he won’t make silly mistakes which means, given the difference in the number of RUST and C++ CVEs, the library will probably be safer. Not to mention faster because of the rewrite and better compilers.


Well ... I fell for it. I'm just a beginner Rust programmer, I don't know the characters involved in Rust so I didn't know Ralhlinus, and I didn't read it on April 1. - so I feel I wasted my time, I was just irritated by some of the statements, but I couldn't tell fact from sarcasm. This is a very in-group kind of joke; I am left wondering what was sarcasm and what are facts.


A bit too trollish to be funny IMHO.

Saying this as a Rustacean.


The part where they said they didn't need inclusivity in computer science made me wanna cry because I didn't realize it was april fools and there are so many people who make that argument unironically..

also the part where they promoted make/cmake :((((

or claimed they can do unsafe code just fine...

all these are real world positions that i've heard defended by old C++ barnacles v_v


I was really confused for a solid second there. The points the author raises are what Rust tries to solve 1) A simpler build system 2) Safety guarantee by the compiler and not the programmer's "I am an experienced dev" etc


Got me for a minute. Nice.


This is the one day I really miss working in the office.


No, bad. Bad. Do not propagandize for the office, even if you miss it. squirts u with windex BAD CAT!


Aw man, this got me good.


I like writing and humour. But it's already been April 2 for more than 7 hours, which is how long ago this was posted (on HN). So please only post serious things now out of respect for those in or near the arse end.


This but unironically.


April Fool’s joke? Otherwise, this is definitely a first.


Definitely Raph is very much into Rust.


It must be an april fools joke


sounds like desperation to become relevant


I think you nailed it. I wake up each morning consumed with anxiety, thinking to myself, "how do I become relevant?" Clearly, having shipped advanced multilingual typesetting capabilities to billions of users didn't do it, nor developing high performance GPU rendering algorithms, nor having made a popular programming font. But posting a language comparison to Hacker News, that should put me on the map.


Face it, your work will never be as immortal as autotools.

You also bet on wrong languages. M4 is battle-tested, stood the test of time, and is much more stable.


You are right, and that is an excellent way to state my goals: I hope to create systems that have as much lasting impact as autotools.


That said, for those of us that don't have the luxury of working only in Rust, the cargo monoculture is a problem.

Or more precisely, as a result of that monoculture there is a single implementation of build.rs and it cannot interoperate with anything else. If cargo could optionally generate a build.ninja file or some JSON with the command it runs, it would be so much easier.


This is in fact one part of the post that was based on an unironic kernel of truth. I've wrestled with this more than most people. In particular I tried to fit cargo into the Fuchsia build system, with only partial success. That approach has been abandoned and Fuchsia now translates Cargo manifests into GN build rules, which seems to be the prevailing approach for polyglot builds, especially with Bazel.

However, the experience when doing pure Rust is night and day compared with stuff like CMake. And even in a polyglot build, the Cargo manifest is a reasonably good starting point, as argued recently by matklad[1].

Obviously, build systems and package managers at large scale are very challenging to get right, otherwise we'd have a good solution by now. I personally think Bazel is a pretty good step in the right direction, but it's very clunky and awkward for smaller projects. I found Neil Mitchell's classification[2] useful. Cargo is best-in-class for the "small" and arguably "medium" cases, but starts showing its limitations beyond that. Bazel is the reverse, one of the few really workable choices for "huge" but not a great experience otherwise.

[1]: https://matklad.github.io/2023/03/28/rust-is-a-scalable-lang...

[2]: https://neilmitchell.blogspot.com/2021/09/small-project-buil...


Do you have a pointer for the translation? As soon as you have a transitive dependency on libc or any other Rust binding to a C library that approach would seem to fail due to the presence of build.rs.


Yes, the tool is cargo-gnaw. It does not evaluate build.rs files itself, but there is a process for evaluating them at the time the crate is vendored.

https://fuchsia.googlesource.com/fuchsia/+/master/tools/carg...


Yeah that's very much a special-purpose tool and cannot be used if for example the build.rs file has different output for Linux/macOS/Windows.

I like the Meson model where the meta-build system is opinionated (not as much as cargo in the case of Meson, but still quite a bit) but, at the same time, it doesn't itself take care of the build. The build is done via build.ninja, static analysis and other tools use compile_commands.json. There is no reason why cargo couldn't work this way and even preserve the same command line interface.


I wouldn't be surprised if he worked with autotools and m4 when working on, for example, an early version of GNOME's librsvg. Seriously, I was looking at a librsvg header file a couple months ago and was surprised to find his name.


Your work will never be as immortal as cockroaches and viruses either.


I thought a sense of humor and maybe a little bit of a thick skin would be required if you want to partake into April fools bashing. Who's taking oneself seriously now...


Don't let the haters get to you. You and your work are awesome.


Holy crap, imagine being this insecure.


One time someone left a comment on one of my videos that was like "I don't like the sound you make when you drink water." And now whenever I look back at that video, I remember that comment, every time. It's wild how the mind works.


I don't know what it is called I just know the sound it makes when it goes down a man's throat.


Yeah, it's no walk in the park, let me tell you that.


[deleted]




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: