News for hackers. Stuff that matters.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Muromec on Monday February 24, 2025 @07:41AM (#43158848)
You can see that Linus actually makes an effort to be at least somewhat nice nowdays, while still sticking to pragmatic technical decisions.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by p0w3n3d on Monday February 24, 2025 @08:01AM (#43159045)
> to be at least somewhat nice nowadays

That's a huge sacrifice when speaking of him, which we must appreciate. But to be honest, I must agree with his point of view.

Golden rule when developing projects is to stick to one (the least amount possible of) technology, otherwise, you'll end up with software for which you need to hire developers of different languages or accept the developers that won't be experts in some of them. I am working on a project that, up until a year ago, had been partly written in Scala. All the Java developers who didn't know Scala were doomed to either learn it in pain (on errors and mistakes) or just ignore tasks regarding that part of the system.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by lambdaone on Monday February 24, 2025 @08:10AM (#43159123)
You're right that this is generally a golden rule. But rules can have exceptions, and this seems to be one of them; the Linux kernel is now so large and complex, and C so obviously outdated now, that it's worth the pain to start writing drivers in Rust. And because of the modularity of the kernel, and the care taken to make Rust binary-compatible with C, this looks to be actually practical, as individual subsystems will be either entirely Rust or entirely C, particularly when new drivers are involved.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @08:51AM (#43159545)
"C so obviously outdated now" lol...

People could have spawned another kernel branch focused around Rust, but know the predictable outcome:

https://en.wikipedia.org/wiki/Second-system_effect

Thus the novelty bias hijacks peoples ability to reason, and everyone gets upset as the Polyglot rots apart.

Polyglot projects by their very nature inject unstable dependencies into the build tree. This also makes the core feature of bootstrapping Linux on new hardware more difficult.

If someone says it is about learning yet another language, than they are disregarding peoples valid concerns. The kernel should be forked eventually with or without foundation support, if people refuse to isolate a branch with the extensive refactoring mission written in hype.

YMMV =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by tremon on Monday February 24, 2025 @09:00AM (#43159635)
Polyglot projects by their very nature inject unstable dependencies into the build tree

What does this mean?

This also make the core feature of bootstrapping Linux on new hardware more difficult.

If by this you mean that Rust doesn't support all the architectures that gcc does:

- that didn't stop people from making sure Linux could be compiled with LLVM as well

- gccrs should make this issue moot anyway, as that will allow Rust code to be emitted for exactly the same architectures as gcc proper

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by bronson on Monday February 24, 2025 @09:12AM (#43159743)
> This also make the core feature of bootstrapping Linux on new hardware more difficult.

No, Rust is currently only for drivers that aren't on that hardware anyway. You can continue to build and use the kernel without Rust just fine.

For now... Maybe one day that discussion will become relevant.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:22AM (#43159849)
The drama started because of the core memory API argument.

That day is today my friend =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @09:50AM (#43160211)
You’re simply incorrect, in a way that Linus himself very clearly stated.

The drama started because Rust used an API written in C. It doesn’t contain any Rust at all. Nothing has changed in this regard.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by oskarkk on Monday February 24, 2025 @11:21AM (#43161318)
Yes, and that API is needed for drivers written in Rust. So it's not like core parts of the kernel are being now written in Rust, it's still just specific Rust drivers.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @10:03AM (#43160335)
It was my understanding the request was to have the core maintainer take on the additional task of supporting the rust API on top of the existing wrapper.

I could be wrong, but a branch or fork seems like the easiest solution. =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by dralley on Monday February 24, 2025 @10:10AM (#43160401)
Your understanding is completely wrong. There was no such request, and that concern was almost immediately addressed by spelling out very directly that no such expectation existed.

https://lore.kernel.org/rust-for-linux/2b9b75d1-eb8e-494a-b0...

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @10:10AM (#43160399)
You misunderstood.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:21AM (#43159835)
"What does this mean?"

In general, mixing languages has serious long-term consequences. Unless you have done refactoring of large legacy systems... you probably wouldn't understand fully.

Perhaps ask why folks didn't create an isolated kernel branch for such a massive refactoring?

"Rust doesn't support all the architectures that gcc does"

Assuming a bootstrap compiler can even bring up Rust or the cargo monstrosity. People will just switch to other options, and maybe someone will get around to a Rusty Linux Fork if the working system needs entertaining drama.

Best of luck =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by tremon on Monday February 24, 2025 @10:28AM (#43160628)
Unless you have done refactoring of large legacy systems... you probably wouldn't understand fully.

The reason I don't understand fully is because you don't explain yourself. I'm not convinved it has anything to do with my work experience.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @10:39AM (#43160770)
"I'm not convinved it has anything to do with my work experience."

I can see how that could be challenging, but some lessons are universal. This talk touches on the problem at an organizational level:

https://www.youtube.com/watch?v=GWgRw5jiYy0

Best I can do for you right now. Good luck =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by bdhcuidbebe on Monday February 24, 2025 @11:15AM (#43161236)
Just stop with the sarcasm, it doesnt belong here.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @11:33AM (#43161477)
The talk covers how polyglot projects tend to fail.

Most folks can disagree on things, and remain respectful. Have a glorious day =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by SR2Z on Monday February 24, 2025 @06:03PM (#43165994)
Except... Most companies offer products built in multiple languages. Google notoriously has a multilingual monorepo and a uniform build system. Every company of non-trivial size uses multiple languages. Even Asahi Linux does!

Polyglot projects are harder, but definitely not as hard as OS development in C.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @06:45PM (#43166318)
Not sure employee attrition rates and canceled project metrics are a positive aspect of Google.

https://en.wikipedia.org/wiki/List_of_Google_products#Discon...

"definitely not as hard as OS development in C"

Depends what you are doing, as complexity is often a sign of poor communication.

https://en.wikipedia.org/wiki/Conway%27s_law

The talk pokes fun at the excuses folks make when kludging something they intended to replace later. =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by SR2Z on Monday February 24, 2025 @08:16PM (#43166916)
Google does not cancel projects because they're technically unwieldy, and if you ask pretty much any ex-Google engineer what they think about internal tooling they will generally praise it because it's very good.

Complexity is a consequence of dealing with the real world. An OS talks to hardware, which might have errata or just straight up random faults.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @08:47PM (#43167129)
Googles initial technological success was due to the design assumption individual systems were never reliable, and should fail back gracefully. It was and still is considered a safe assumption...

Indeed, on average 52% of all IT projects at any firm end up failing, or were never used as designed. What exactly does a glorified marketing company have to do with successful OS design? The internal Android OS they planned to replace Linux with was canceled too. "All software is terrible, but some of it is useful" =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by SR2Z on Tuesday February 25, 2025 @01:53PM (#43175805)
I would suggest actually reading what engineers who have worked at the company say about it. Many of these statements you've just made are irrelevant or factually incorrect (e.g. Fuschia might be cancelled, but Google remains one of the major contributors to Linux and is certainly not a "marketing company.")

Have a good day!

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Tuesday February 25, 2025 @02:38PM (#43176307)
'certainly not a "marketing company."'

So you think they publish free services out of charity? Perhaps the technology business is not for you...

Best of luck =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by whstl on Tuesday February 25, 2025 @03:23AM (#43169464)
Yep. Even small companies.

The majority of companies doing web is doing "something plus Javascript".

And then if there's some AI in the mix, there's also almost always Python. Often maintained by a super small team.

What about apps? Java and Swift. The migration to Swift included a lot of Obj-C and Swift living side by side for a while. Same with some apps migrating to Kotlin.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Tuesday February 25, 2025 @06:57AM (#43170812)
In general... it is often a skill issue with labor pools, as firms accepted Java/JavaScript is almost universally known by juniors.

Apps are in user space, and are often disposable-code after 18 months in most cases. Projects like https://quasar.dev/ offer iPhone/Android/iOS/MacOS/Win11 single code base auto-generated App publishing options, but most people never hear of it given a MacOS build host is required for coverage.

The talk pokes fun at the Ivory tower phenomena, and how small-firm logical assumptions halt-and-catch-fire at scale. =3

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

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by SR2Z on Tuesday February 25, 2025 @01:51PM (#43175766)
How the can it possibly be an issue with the labor pool when JS is the only truly supported web language and Python is the main language for ML tooling?

I think that you are handwaving away differences in runtime environments. All languages (almost) are Turing-conplete. Many of them, if used in the wrong context, will get you stuck in a Turing tarpit.

Languages succeed or fail on the strength of their runtimes. If you seriously think that mixed-code codebases are trash after 18 months, then I think I'm wasting my time - that statement is so fundamentally detached from reality that I don't even know how to start.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Tuesday February 25, 2025 @02:35PM (#43176276)
"that statement is so fundamentally detached from reality that I don't even know how to start."

It is the statistical average for Android, but again it depends on the use-case situation. Apps are a saturated long-tail business that fragmented decades ago.

Python sits on top of layers of C++ wrappers for most ML libraries, and doesn't do the majority of the heavy computation in Python itself (that would be silly). Anyone dealing with the CUDA SDK for Pytorch installs can tell you how bad it is to setup due to versioning. That is why most projects simply give up to use a docker image to keep the poor design dependencies operational on a per project basis.

"then I think I'm wasting my time"

Than just let the community handle the hard part, and avoid having to figure it out yourself:

https://github.com/dambergn/ai-stack

I think you are confusing ML work with end users playing with other peoples algorithms.

Best of luck =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by whstl on Thursday February 27, 2025 @04:49AM (#43192794)
Sorry but apps being disposable and "JS-only frameworks" existing doesn't change reality. Nor do juniors only knowing only one language.

Single-language codebases are the exception rather than the rule in a lot of industries, which includes apps and web. Ditto for operating systems: the Linux Kernel might be majorly C, but both Windows and Mac mix C and C++ in the kernel but a lot of userland is in C#, or a mix of Swift and Objective-C.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Thursday February 27, 2025 @10:37AM (#43195338)
"Explanations exist; they have existed for all time; there is always a well-known solution to every human problem -- neat, plausible, and wrong." ( H. L. Mencken )

Probably conflating popularity with good design. The talk covers the financial incentives for naive code choices, and perceived job security in ivory towers.

It might work for you, but in general is bad for the firm long-term. Best of luck =)

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by whstl on Thursday February 27, 2025 @09:32PM (#43201067)
Please don't put words in my mouth. I'm not conflating popularity with good design, in fact I haven't said anything of the sort.

And sorry but the other half of your message has nothing to do with what I wrote.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Thursday February 27, 2025 @11:04PM (#43201575)
"Single-language codebases are the exception rather than the rule in a lot of industries"

And indeed >52% of those Polyglot projects end up failing in more than one way, and are refactored or abandoned. I didn't like that the talk rips on Elixir/Phoenix either, but factually his insights were not inaccurate.

On average it takes around 2 to 3 years to understand why... As it takes time to see why Tacit knowledge is often ephemeral. Tantalizing bad ideas reverberate on the web, and the naive recycle them like facts. YMMV and it usually doesn't matter if you have under 38k concurrent users... and spend $3m/month in transfer fees to AWS. Perhaps your part of the world works differently than mine. =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @09:48AM (#43160190)
The kernel doesn’t use Cargo, by the way.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:58AM (#43160291)
Indeed, its actually worse because "x.py" has a lot more dependencies. lol =3
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @10:11AM (#43160408)
The kernel doesn’t use or interact with x.py either. The Rust code uses build to drive rustc, just like the rest of the kernel.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @10:19AM (#43160526)
I think you are operating under the assumption a fully compatible cross-compiler environment is already available in both languages. =3
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @10:44AM (#43160826)
Drivers are hardware specific, and so it's not a problem that Rust has support for a subset of the platforms that the kernel does. If you want to write a driver for a platform Rust doesn't support, just write it in C.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @11:02AM (#43161066)
"If you want to write a driver for a platform Rust doesn't support, just write it in C."

¯\_(ツ)_/¯ Or a separate branch for Rust in the first place. We are falling into the circular reasoning logic loop. lol =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Muromec on Monday February 24, 2025 @08:21PM (#43166946)
Drivers are usually hardware specific but are not always platform specific. For example all the usb device drivers (but not host drivers) from x86 work just fine on arm and risc. And kernel isn’t just device drivers, but also stuff like network — higher level abstractions are decoupled from platform quite good.

I don’t think there is practical intersection of platforms not supporting rust and running USB host, but by the time rust will creep into something line network subsystem code you will either not have network (which was working before) or you make yourself a rust compiler.

This can mean dropping platform support. Maybe those are dead platforms, but somebody will make the argument that adding rust made things objectively worse.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @09:01PM (#43167223)
Sure. The point is, this is for new code where you know Rust supports the platform. It “creeping in” to something Rust can’t support won’t happen, because then the rust-less build will break.

You are right that there are other policies that could work in a different way, but these policies were chosen specifically so that Rust doesn’t make the kernel sacrifice old platforms.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:32PM (#43167409)
'It “creeping in” to something Rust can’t support won’t happen'

The exact same argument could be made for future architectural changes, as OpenBSD/FreeBSD/NetBSD build requirements will now beat Polyglot Linux in every metric of porting complexity moving forwards.

We can't have it both ways... Best regards =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by marcosdumay on Monday February 24, 2025 @11:40AM (#43161569)
> People could have spawned another kernel branch focused around Rust

Linus already decided his one will be a mixed-languages fork. You are perfectly free to fork your own C-only kernel and maintain it.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @02:16PM (#43163658)
The hobby kernel I work on is only 68KiB in size, and won't work with most von Neumann machines. Probably a waste of time, but a fun odd architecture given the relative simplicity. =3
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by pjmlp on Monday February 24, 2025 @09:36AM (#43160035)
C already felt outdated in 1993, that is why since then I rather use C++ than C, when the choice boils down to these two languages.

Exception being when there is really no way around C, like UNIX clones related development, or some kinds of embedded development.

Even when using TypeScript, we sometimes have to occasionally get dirty with JavaScript. :)

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:53AM (#43160241)
"I rather use C++ than C"

Depends what you are building, as some language specific features make specific tasks more difficult.

Unfortunately, often we must deal with the infrastructure we are given. =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by pjmlp on Monday February 24, 2025 @11:02AM (#43161074)
Agreed, that is why "Exception being when there is really no way around C,..."

The first startup I worked on, back in the crazy 2000's, we were replicating AOLServer at our own way, and all the Tcl extension modules were written in C, because multiple reasons, including writing portable C across several UNIX variants was already complicated enough, e.g. the HP-UX aC we were using was still not C89 compliant, no need to add C++ into the picture.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by braiamp on Monday February 24, 2025 @08:59AM (#43159627)
And yet, the powers that be, understand that, and have reasoned that the upside of preventing new code with bugs into the kernel is way too attractive to ignore.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:07AM (#43159702)
People didn't build a new kernel branch option for staging a massive refactoring did they... Instead idealists hijacked a successful project, and told the people with valid concerns to pound sand. Forks are part of a healthy ecosystem...

Good luck =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by imtringued on Monday February 24, 2025 @10:32AM (#43160690)
Linus torvalds is the biggest idealist here.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by wffurr on Monday February 24, 2025 @08:31AM (#43159345)
Is that really a “golden rule”?

I have worked on lots of cross language codebases. While it’s extremely useful to have experts in language or part, one can meaningfully contribute to parts written in other languages without being an expert. Certainly programmers on the level of kernel developers should readily be able to learn the basics of Rust.

There’s lots of use cases for shared business logic or rendering code with platform specific wrapper code, e.g. a C++ or Rust core with Swift, Kotlin, and TypeScript wrappers. Lots of high level languages have a low level API for fast implementations, like CPython, Ruby FFI, etc. The other way around lots of native code engines have scripting APIs for Lua, Python, etc.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by w0m on Monday February 24, 2025 @09:00AM (#43159636)
I don't know if its golden rule or common-sence when applicable.

If our testing framework is in Python; writing a wrapper to code tests for your feature in Perl because you're more comfortable with it is the Wrong way to do it imo.

But if writing a FluentD plugin in Ruby solves a significant problem in the same infra; the additional language could be worth it.

Everything is about tradeoffs.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by GiorgioG on Monday February 24, 2025 @08:46AM (#43159498)
I've been doing this for over 20 years and it's the first I've heard of this "golden rule". I guess we've all been doing it wrong...writing our backends (pick your poison), frontends (TS/JS) and queries (SQL) in a variety of languages forever.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by jeroenhd on Monday February 24, 2025 @08:54AM (#43159580)
I've mostly seen language mixing in frontend. Backends seem to end up either being completely ported to a new (compatible) language, or experimental new languages get ported back. Perhaps frontend developers are just more versatile because they have to, with frameworks and the base spec constantly shifting under their feet.

Even many backend devs seem to shy away from things like SQL because they're not too comfortable with it. Which isn't bad per se, it's very easy to make a small mistake in a query that crushes the database, just a personal observation of mine.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by kasey_junk on Monday February 24, 2025 @08:59AM (#43159626)
In 30 years as a backend engineer I’ve never worked in a single language codebase.

The idea that there is some rule that you don’t mix languages seems like absolute nonsense. If someone suggested to me that it was _possible_ I’d be extremely curious what wild tradeoffs they were making to get there.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by jeroenhd on Monday February 24, 2025 @09:30AM (#43159942)
I think it makes sense to have a preference for a single language in code bases when all of your developers only have one language in common and are not interested in learning any more languages in the future. That doesn't necessarily make it a golden rule.

However, in my work I've seen plenty of developers with all manner of interests and experiences align only on one or two languages, and if that's your company's talent pool, single language code bases seem like a good idea.

Of course this skips over all the usage of scripting languages (makefile/bash/Python/XML) which in my experience are seen as quirks of build tooling rather than part of the product.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by QuadmasterXLII on Monday February 24, 2025 @02:05PM (#43163503)
There’s also complementary vs competitive: C++/python (pytorch, itk, ROS) or Go/js (default web stack) aren’t going to quibble over what belongs in what language- react/swift or c/rust codebases have no such natural partition
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by toyg on Monday February 24, 2025 @09:48AM (#43160195)
> Perhaps frontend developers are just more versatile

Considering that they'll want to use Node even to make coffee, I'd argue that statement is wildly inaccurate.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by josefx on Monday February 24, 2025 @09:29AM (#43159932)
And if you look how that mess started out you had cross site scripting on the frontend because html allowed you to inject more javascript from everywhere and SQL injection on the backend because you had to translate your input from one language to another with tools that went out of their way to interpret data as commands.

The modern web is a gigantic mess with security features hacked on top of everything to make it even remotely secure and the moment it hit the desktop thanks to electron we had cross site scripting attacks that allowed everyone to read local files from a plugin description page. If anything it is the ultimate proof how bad things can go.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by mamcx on Monday February 24, 2025 @10:39AM (#43160773)
And the people like me that work in ERP's/bussines apps have even more langs.

I have used around 20+ in my little project (mostly solo) and I have now:

* Rust

* Kotlin

* Swift

* Html

* Sql with variations for: Postgres, Sqlite, Sql Server, Firebird, DBISAM, MySql

* Go

* FreePascal

And now is when I have less languages.

People are flexible.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by pjmlp on Tuesday February 25, 2025 @04:44AM (#43169950)
Double that, I think the only time I was single language developer was when Timex 2068 BASIC was the only programming language I knew.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by thegrim33 on Monday February 24, 2025 @09:00AM (#43159632)
At my last job at a FAANG we had an Android app in Kotlin, and in all their wisdom the management decided to jump on the hip new thing, React Native, and start coding new/certain features in React Native.

Multiple years later, what was the state of things? We had a portion of the codebase in Kotlin with dedicated native/Kotlin developers, and a portion of the codebase in RN with dedicated RN/JS developers.

Any time there's a bug it's a constant shuffle between the teams of who owns it, which part of the code, native or JS the bug is coming from, who's responsible for it. A lot of time time nobody even knows because each team is only familiar with part of the app now.

The teams silo themselves apart. Each team tries its best to hold on to the codebase - native teams tries to prevent JS team from making the whole thing JS, the JS team tries to covert as much to JS as possible. Native team argues why JS features aren't good, JS team argues the benefits over writing in native. Constant back and forth.

Now, no team has a holistic view of how the app works. There's massive chunks of the app that some other team owns and maintains in some other language. The ability to have developers "own" the app, know how it works, have a holistic understanding of the whole product, rapidly drops.

Every time there's a new feature there's an argument about whether it should be native or RN. Native team points out performance and look-and-feel concerns, RN team points out code sharing / rapid development benefits. Constant back and forth. Usually whoever has the most persuasive managers wins, rather than on technical merit.

Did we end up with a better app with our new setup, compared to one app, written in one language, with a team of developers that develop and own and know the entire app? No, no I don't think so.

Feels like pretty parallel of a situation compared to Rust/C there.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by ratorx on Monday February 24, 2025 @09:31AM (#43159957)
Other than the choice problem of deciding what language to build new features in (which needs a clear policy), I don’t see why maintaining a mixed language codebase HAS to be terrible.

In my current job, also at FAANG, my team (albeit SRE team, not dev team), owns moderately sized codebases in C++, Go, Python and a small amount of Java. There are people “specialised” in each language, but also everyone is generally competent enough to at least read and vaguely understand code in other languages.

Now of course sometimes the issue is in the special semantics of the language and you need someone specialised to deal with it, but there’s also a large percentage which is logic problems that anyone should be able to spot, or minor changes which anyone can make.

The key problem in the situation you described seems to be the dysfunction in the teams about arguing for THEIR side, vs viewing the choice of language as any other technical decision that should be made with the bigger picture in mind. I think this partly stems from unclear leadership of how to evaluate the decision. Ideally you’d have guidance on which to prioritise between rapid development and consistency to guide your decisions and make your language choice based on that.

As your codebase scales beyond a certain point, siloing is pretty inevitable and it is better to focus on building a tree of systems and who is responsible for what. However that doesn’t absolve especially the leads from ONLY caring about their own system. Someone needs to understand things approximately to at least isolate problems between various connected systems, even if they don’t specialise in all of them.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by fingerlocks on Monday February 24, 2025 @09:38AM (#43160060)
Out of the “FAANG” list, we can rule out Apple for obvious reasons and Amazon because it’s evident from the poor usability of their mobile apps that they have zero native code. Does Google use RN? Seems unlikely with their Flutter stack.

Was this at Meta? I doubt the iOS FB app and Insta are using RN so that must leave FB messenger?

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @12:30PM (#43162300)
> I doubt the iOS FB app and Insta are using RN

https://reactnative.dev/blog/2017/08/07/react-native-perform...

> React Native is used in multiple places across multiple apps in the Facebook family including a top level tab in the main Facebook apps. Our focus for this post is a highly visible product, Marketplace.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by qchris on Monday February 24, 2025 @09:38AM (#43160066)
While I think your points about some of the difficulties that arise in multi-language/framework projects is fair, I sort of roll my eyes whenever someone frames Rust as something like the "hip new thing".

The Linux kernel's first "release" was in 1991, hit 1.0 in 1994, and arguably the first modern-ish release in 2004 with the 2.6 kernel. Rust's stable 1.0 release was in 2015, 13 years ago. There are people in the workforce now who were in middle school when Rust was first released. Since then, it has seen 85 minor releases and three follow-on editions, and built both a community of developers and gotten institutional buy-in from large orgs in business-critical code.

Even if you take the 1991 date as the actual first release, Rust as a stable language has existed for over 1/3 of Linux's public development history (and of course had a number of years of development prior to that). In that framing, I think that it's a little unfair to include it in the "hip new thing" box.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by pseudocomposer on Monday February 24, 2025 @09:01AM (#43159641)
I’d argue that number of languages is less critical than how well-supported/stable the languages/frameworks chosen are, and whether the chosen tools offer good DX and UX. In simple terms… a project using 5 very-well-supported languages/frameworks (say, C, Rust, Java, Python, modern React/TS) is a lot better off than one with 3 obscure/constantly-shifting ones (say, Scala, Flutter, Groovy).

Anyway, I’m a bit of a Rust fanboy, and would generally argue that its use in kernel and other low-level applications is only a net benefit for everyone, and doesn’t add much complexity compared to the rest of these projects. But I could also see a 2030 version of C adding a borrow checker and more comparable macro features, and Rust just kind of disappearing from the scene over time, and its use in legacy C projects being something developers have to undo over time.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by chamomeal on Monday February 24, 2025 @09:04AM (#43159665)
Is that possible? Could C add a borrow checker? Honest question, I have no idea how anything works
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by jcranmer on Monday February 24, 2025 @11:15AM (#43161243)
C takes backwards compatibility quite seriously, so anything it adds has to be opt-in (not that it stops some people from trying to propose seriously breaking changes, but c'est la vie).

Something like a borrow checker can be added (and there are people on the C committee willing to see it). However, Rust's "shared xor mutable" rules are probably too strong for C, so you'd need to find some weaker model that solves a good deal of memory safety issues (maybe expressing pointer ownership and some form of invalidation is sufficient, but this is just some spitballing by me). The focus by the interested people right now is mostly around bounds-checking rather than a borrow checker.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @11:03AM (#43161084)
In theory, they could. In practice, I would be shocked. As an example, Rust's memory safety rules are fundamentally built on top of generics, which C does not have. So in order to copy what Rust does, they'd need to do that first, and that's a massive change to the language.

C++ does have generics already (well templates, but you know) and so it'd be an easier lift there, but it's still a lot of work. https://safecpp.org/draft.html explains how this would be possible.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by tremon on Monday February 24, 2025 @10:12AM (#43160416)
Not really possible, I think. C is a language that's basically built on memory aliasing and pointer arithmetic: every variable is represented as a location in memory, but there is no guarantee that each memory location is only represented once (there can be many variables pointing to the same memory address). The Rust borrow checker needs pretty much the opposite guarantee: every declared variable has full control over its memory location, and if two pieces of code need to share memory there needs to be an explicit protocol for delegating access.

And it's not like pointers are a rare occurrence in C. This mechanism is used pretty much everywhere: accessing array values, parameter pass-by-reference, function output parameters, string manipulation. There's no concept of function purity either, so no way to guarantee in the function definition that a function cannot outstep its bounds. Sure, there are certain safe coding conventions and rules about what you can or cannot do in a C program, but fundamentally proving that a certain memory location is only accessed through a certain variable is only possible by just running the program exhaustively -- or by confining yourself to a subset of C.

But when you only allow a subset of C, it's no longer "C with a borrow checker", especially given the ubiquitous use of pointers for standard language features. It quickly becomes "we hobbled C because we need more guarantees". To take a quote from the D manual [0], to guarantee memory safety you need to disallow:

  - Casts that break the type system.
  - Modification of pointer values.
  - Taking the address of a local variable or function parameter.
[0] https://dlang.org/spec/memory-safe-d.html
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @11:05AM (#43161113)
> C is a language that's basically built on memory aliasing

Additionally, C does actually have aliasing rules, but many projects, including the kernel, turn them off. Linus in particular does not think they're worthwhile.

These rules are different than Rust's, Rust also rejected these particular rules.

> To take a quote from the D manual [0], to guarantee memory safety you need to disallow

Just to be clear, this is the list for D, not in general. Rust is fine with you taking the address of a local variable or function parameter.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by tremon on Monday February 24, 2025 @02:45PM (#43164017)
> C does actually have aliasing rules

If you're referring to e.g. gcc's -f[no-]strict-aliasing option, then that's more about type compatibility than about limiting the scope of memory aliasing in general. If you mean something else, I'm interested to hear more.

> this is the list for D, not in general

Yes, I know. But it's the first authoritative source I could think of on memory safety in C-like languages. I don't think the list is wrong for C proper, just probably not exhaustive.

> Rust is fine with you taking the address of a local variable

Yes! But circling back to the earlier point: in Rust you can do this specifically because the language has well-defined lifetime semantics on variables and ownership. And as such, Rust can guarantee that a) a pointer to a memory location does not outlive the scope of the memory allocation itself, and b) when two variables/pointers refer to the same memory location, there is a compiler-enforced protocol for accessing and mutating that memory.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @02:52PM (#43164116)
> then that's more about type compatilibity than about limiting the scope of memory aliasing in general.

It's about limiting the ability of pointers to alias. The C standard even has this parenthetical:

> The intent of this list is to specify those circumstances in which an object can or cannot be aliased.

You are correct that it's a pretty narrow set of rules. There are only six items on that list. But it's still an aliasing rule.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by porridgeraisin on Monday February 24, 2025 @10:12AM (#43160427)
> Could C add a borrow checker

As I understand it, doing it while maintaining compatibility with old code is not possible. You'd have to add new required syntax for annotations and such.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by 1970-01-01 on Monday February 24, 2025 @09:16AM (#43159793)
>I find it distressing that you are complaining about new users of your code, and then you keep bringing up these kinds of complete garbage arguments. Honestly, what you have been doing is basically saying "as a DMA maintainer I control what the DMA code is used for". And that is not how any of this works.

I appreciate that his anger is still there, its just worded differently, in a more modern (softer) attack. Is this still how we control developers in 2025? Yes! Deal with it or go fork it yourself. The day this goes away is the day Linux begins to die a death of 1,000,000 cuts in code quality.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by philistine on Monday February 24, 2025 @10:31AM (#43160678)
I've never seen anyone talk about Linus' bilingualism concerning his anger issues. I'm bilingual, and sound much harsher and mean in English than in my native tongue. Could that be an element of the problem?
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by perching_aix on Monday February 24, 2025 @10:39AM (#43160765)
Could be, but having seen a couple of his crashouts, I don't really feel like buying that. According to his Wikipedia page, he's also been living in the States for about 25 years, and been a citizen for 15. If he couldn't achieve appropriate mastery of the English language with so much time spent collaborating with others using it essentially exclusively, and having lived for decades in a country where it is the native everyday language, I'd find that legitimately more impressive than the opposite.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by stavros on Monday February 24, 2025 @12:30PM (#43162292)
This isn't mastery of the English language, he's mastered it fine. This is mastery of American working culture, which is optional. The reason why he grates Americans so much is because he's direct about his feedback, which Americans take as anger.

To me (a Greek), what he says is fine. He never gets personal, he talks about the arguments/points/issues, not the person. "complete garbage arguments" is a judgement of the arguments, not of the person, and it's fine to tell someone their arguments are garbage, if that's what you think about them.

Americans/Canadians/the English will interpret that as anger, but, in other cultures, it's just voicing one's opinion.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by perching_aix on Monday February 24, 2025 @01:14PM (#43162848)
Well I'll be damned then, cause (old example that came my way) ...

> Key, I'm f*cking tired of the fact that you don't fix problems in the code *you* write, so that the kernel then has to work around the problems you cause.

... this is getting personal, this is being knowingly crass, this is universally offensive (albeit fairly mild), and I have extremely serious doubts that in Greek being told that people are fucking tired of your behavior is "just voicing one's opinion".

You also have to appreciate that this is from an email. You don't type out an email like this and hit send without being really quite content with it. I cannot personally imagine sending an email (or even a text message) like this to anyone at work, for example, and there have been times where they definitely would have deserved this and then some.

There are communities and workplaces where this type of communication is the norm, yes, and it used to be especially common in the past (and from what I know, still often is in blue collar jobs). This is true both in and outside of America.

I'm not from America, I'm from Central-Europe. I know what being "direct and upfront" is like, and this is not that. This is just being a twat. Language like this is never productive or acceptable in any culture, and it's not some American mind-virus spreading around the world that made people figure they can and should afford to have standards regarding their interactions with one another.

If anything, the trendy bit here is the opposite, where people seem to make a sport out of mischaracterizing being crass as saying hard truths. Just like how cynicism is often mistaken as intellectualism, this is also utterly misguided, and Linus is being washed of his personal faults out of respect, not because he's not at fault in reality.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by blueflow on Monday February 24, 2025 @04:08PM (#43164960)
I'm a central European as well and i do not only think Linus's tone is okay, I'm actually more comfortable around people like him. I find this watch-your-words culture repressive, and being with people who use and tolerate the "bad words" as well is liberating.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by perching_aix on Monday February 24, 2025 @05:16PM (#43165576)
Ultimately that's on everyone to decide on their own. I personally feel the exact opposite way, that although having to mind my speech gets really quite annoying at times, and that there are communities who for whatever reason really overdo it, I really do not wish to participate in communities where the disregard of it, in the form of a quasi rebellious attitude, has taken deep cultural root.

The best of both worlds for me is when I can naturally just mingle with others without this issue cropping up, because the chemistry just works out on its own. I miss and greatly cherish those people I've met over the years who I was able to collaborate and spend time with like that. Instead of subscribing to either extreme, that's the kind of interaction I'm actually wishing to experience more of.

Regrettably, I feel this has been becoming less and less likely over time, which I attribute to the growing distrust and hostility among people at large, as well as the countless other (what I perceive as) dysfunctional social dynamics on the internet these days (e.g. mainstream political activism and counteractivism on community spaces of all kinds). And then who knows.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by whstl on Tuesday February 25, 2025 @03:17AM (#43169438)
I don't think anyone here is saying that the problem are the "bad words" themselves.

I'd wager that a lot of people here are probably fine with someone shouting "motherfucker" at a problem in your screen, or saying that something is "fucking stupid", but draw the line at shouting or telling this to a person... especially in a public email, and even more especially when you're in a position of power over them.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by pjmlp on Tuesday February 25, 2025 @04:41AM (#43169936)
As South European living in Central Europe, and having worked for several years at Nokia, I also don't have an issue with Linus.

In fact I do happen to land in traps in Germany and UK, where when being more frontal at work turns bad, because apparently we have to be all smiles, and complain in a positive way with euphemisms.

A technique that I have improved over the years, talk back with the feeback level expected from the target culture, when I know their background beforehand.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by stavros on Tuesday February 25, 2025 @05:06AM (#43170066)
"I'm fucking tired of the fact that you don't fix problems in the code you write" doesn't make any judgement about the person, it makes a factual judgement of what they did. He didn't say "you're a bad coder", he said "you create bugs and then don't fix them".

Sure, he could have omitted the word "fucking" there, which doesn't add much, but "I'm tired of the fact that you don't fix the problems in your code" is really good, direct, honest feedback.

I understand that the person receiving it might feel bad, but they might also feel bad with "I've noticed that sometimes you tend to leave some bugs unfixed, even if perhaps they were caused by your own commits". When you give feedback, you should steer away from making personal judgements, focus on the facts, and deliver the feedback calmly, and Linus' sentence hits two of the three, which isn't too bad.

Anglo cultures really do tend to walk on eggshells to avoid hurting feelings, which other cultures might find tiring and somewhat disingenuous.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by perching_aix on Tuesday February 25, 2025 @09:16AM (#43172109)
> "I'm tired of the fact that you don't fix the problems in your code" is really good, direct, honest feedback.

I disagree. I don't see why Linus being tired or not is technically relevant at all. Leading with it makes it sound like he's looking for the guy to stop tiring him, rather than actually remediate his lapses in self-review.

Being courteous is not about avoiding a negative experience at all costs, it's about being considerate of it, keeping in mind that it exists. If you know you're going to tell the guy they're causing issues, then not making that about how fucking tired that makes you feel shows that you're not trying to mess with their head, but trying to actually address the issue. It's specifically to avoid the ambiguity on whether he has a problem with the person or what they're doing, since when insulted, people tend to reasonably assume they're being found to be problematic.

I really don't think this is all that culture specific, and that this is just some freak cultural mismatch having been ongoing for decades. Not ethnic cultural at least.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by _Tev on Tuesday February 25, 2025 @10:15AM (#43172943)
Maybe it is not exactly culture-specific, but most of your post definitely sounds to me like "walking on eggshells" stavros mentioned.

Tbh I agree that your citation of Linus' email was an example of not exactly productive conversation. But preventing such emotion ventillation takes effort, same as not feeling insulted when your work is criticized. And who should put in the emotional effort is imo at least partially influenced by cultural expectations.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by perching_aix on Tuesday February 25, 2025 @10:56AM (#43173524)
I don't think these are mutually exclusive, and I also don't think that this is a scenario where that Key person just needed to put in effort to not feel insulted when their work was criticized, because it was them and their behavior that was criticized, not their work.

If wanting others to not say things like how they're "fucking tired of someone else or their behavior" is making them walk on eggshells, and can remain elusive to them for decades out of cultural differences, then clearly I'm taking crazy pills, because that's just about the most outlandish proposal I've ever come across.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Muromec on Monday February 24, 2025 @11:57AM (#43161822)
That could be, but could be other way around. I would swear much, much more in my native language compared to English. You never know, maybe Linus always tuned it down.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by palmotea on Monday February 24, 2025 @12:04PM (#43161941)
> I've never seen anyone talk about Linus' bilingualism concerning his anger issues. I'm bilingual, and sound much harsher and mean in English than in my native tongue. Could that be an element of the problem?

Kinda relevant: https://www.nytimes.com/2024/05/14/magazine/native-language-...:

> My own introduction to speaking French as an adult was less joyous. After reaching out to sources for a different article for this magazine with little success, I showed the unanswered emails to a friend. She gently informed me that I had been yelling at everyone I hoped to interview.

> Compared with English, French is slower, more formal, less direct. The language requires a kind of politeness that, translated literally, sounds subservient, even passive-aggressive. I started collecting the stock phrases that I needed to indicate polite interaction. “I would entreat you, dear Madam ...” “Please accept, dear sir, the assurances of my highest esteem.” It had always seemed that French made my face more drawn and serious, as if all my energy were concentrated into the precision of certain vowels. English forced my lips to widen into a smile.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by eddieroger on Monday February 24, 2025 @11:15AM (#43161233)
That's a good point, and I'm surprised it doesn't come up more often. Not just the language itself, but use of it - how many of us read it in the light of American values taught through English and things like not cursing or lack of being direct, where Linus has just always communicated that way, and there's no ego or kindness at play. He shares what he sees and thinks as directly as he sees it and moves on, and that itself doesn't necessarily mean anger.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by WithinReason on Monday February 24, 2025 @09:43AM (#43160132)
*Deal with it or go fork (it) yourself
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by hagbard_c on Tuesday February 25, 2025 @03:12PM (#43176734)
It probably takes a person with a direct approach to bullshit to keep a free software kernel/OS project on track. Linus Torvalds for Linux, Theo de Raadt for OpenBSD, both known for their lack of tolerance for bullshit, both heading projects which managed to stay on their respective tracks for decades. In medicine 'gentle healers make stinky wounds' and the same is true for software development.