Remix.run Logo
lomase 7 hours ago

That is why most of the world has not been using c/c++ for decades.

scuff3d 6 hours ago | parent | next [-]

I'm not on the Rust bandwagon, but statements like this make absolutely no sense.

A lot of software was written in C and C++ because they were the only option for decades. If you couldn't afford garbage collection and needed direct control of the hardware there wasn't much of a choice. Had their been "safer" alternatives, it's possible those would have been used instead.

It's only been in the last few years we've seen languages emerge that could actually replace C/C++ with projects like Rust, Zig and Odin. I'm not saying they will, or they should, but just that we actually have alternatives now.

pjmlp an hour ago | parent | next [-]

At least on PC world you could be using Delphi, for example, or Turbo Pascal before it.

Also I would refrain me to list all other alternatives.

vbezhenar 5 hours ago | parent | prev [-]

One could rewrite curl with Perl 30 years ago. Or with Java, Golang, Python, you name it. Yet it stays written with C even today.

johncolanduoni 2 hours ago | parent | next [-]

If you’re trying to demonstrate something about Rust by pointing out that someone chose C over Perl, I have to wonder how much you know about the positive characteristics of C. Let alone Rust.

avhception 4 hours ago | parent | prev [-]

Your comment comes across disingenuous to me. Writing it in, for example, Java would have limited it to situations where you have the JVM available, which is a minuscule subset of the situations that curl is used in today, especially if we're not talking "curl, the CLI tool" but libcurl. I have a feeling you know that already and mostly want to troll people. And Golang is only 16 years old according to Wikipedia, by the way.

vardump 7 hours ago | parent | prev | next [-]

That's not true when the topic is operating system kernels.

checker659 6 hours ago | parent [-]

OS kernels? Everything from numpy to CUDA to NCCL is using C/C++ (doing all the behind the scene heavy lifting), never mind the classic systems software like web browsers, web servers, networking control plane (the list goes on).

lmm 6 hours ago | parent [-]

Newer web servers have already moved away from C/C++.

Web browsers have been written in restricted subsets of C/C++ with significant additional tooling for decades at this point, and are already beginning to move to Rust.

drnick1 6 hours ago | parent | next [-]

There is not a single major browser written in Rust. Even Ladybird, a new project, adopted C++.

lmm 6 hours ago | parent [-]

Firefox and Chrome already contain significant amounts of Rust code, and the proportion is increasing.

vbezhenar 5 hours ago | parent [-]

https://github.com/chromium/chromium : C++ 74.0%, Java 8.8%, Objective-C++ 4.8%, TypeScript 4.2%, HTML 2.5%, Python 2.4%, Other 3.3%

https://github.com/mozilla-firefox/firefox : JavaScript 28.9%, C++ 27.9%, HTML 21.8%, C 10.4%, Python 2.9%, Kotlin 2.7%, Other 5.4%

How significant?

estebank 4 hours ago | parent [-]

According to https://4e6.github.io/firefox-lang-stats/, 12%.

I would love an updated version of https://docs.google.com/spreadsheets/d/1flUGg6Ut4bjtyWdyH_9e... (which stops in 2020).

For Chrome, I don't know if anyone has compiled the stats, but navigating from https://chromium.googlesource.com/chromium/src/+/refs/heads/... I see at least a bunch of vendored crates, so there's some use, which makes sense since in 2023 they announced that they would support it.

RealityVoid 4 hours ago | parent | prev [-]

> Web browsers have been written in restricted subsets of C/C++ with significant additional tooling for decades at this point

So, written in C/C++? It seems to me you're trying to make a point that reality doesn't agree with but you stubbornly keep pushing it.

lmm 4 hours ago | parent [-]

> So, written in C/C++?

Not in the sense that people who are advocating writing new code in C/C++ generally mean. If someone is advocating following the same development process as Chrome does, then that's a defensible position. But if someone is advocating developing in C/C++ without any feature restrictions or additional tooling and arguing "it's fine because Chrome uses C/C++", no, it isn't.

bogantech 7 hours ago | parent | prev | next [-]

Most software development these days is JS/Typescript slop, popular doesn't equal better

recursive 6 hours ago | parent [-]

You can write slop in any language. And good software for that matter.

wat10000 7 hours ago | parent | prev | next [-]

Most of the world uses other languages because they’re easier, not because they’re safer.

gpm 7 hours ago | parent [-]

They're easier because, amongst other improvements, they are safer.

lawn 4 hours ago | parent | prev [-]

People didn't use seatbelts before seatbelts were invented.

estebank 3 hours ago | parent [-]

And when they were mandated, it made a lot of people very angry!

https://www.cbc.ca/player/play/video/1.3649589