5 ms·
Safety is good.
by anotherhue 10mo ago
Safety is good.
- lomase 10mo agoThat is why most of the world has not been using c/c++ for decades.
- bogantech 10mo agoMost software development these days is JS/Typescript slop, popular doesn't equal better
- recursive 10mo agoYou can write slop in any language. And good software for that matter.
- mlindner 10mo agoI've never met anything written in JS/Typescript that I would call "well written".
- lomase 10mo agoBait used to be credible.
- josephg 10mo agoI have. I personally really enjoy the recent crop of UI frameworks built for the web. Tools like Solidjs or Svelte. Whatever your thoughts are about react, the JavaScript community that has been the tip of the spear for experimenting with new ways to program user interfaces. They’ve been at it for decades - ever since jQuery. The rest of the programming world are playing catchup. For example, SwiftUI. VSCode is also a wonderful little IDE. Somehow much faster and more stable than XCode, despite being built on electron.
- division_by_0 10mo agoGreat points! I think your point about the JS community is often overlooked. Electron et al have made desktop UI/UX considerations more salient in the JS world. Desktop-like experiences in the browser can be great.
- recursive 10mo agoI guess you should read more code.
- vardump 10mo agoThat's not true when the topic is operating system kernels.
- checker659 10mo agoOS 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 10mo agoNewer 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 10mo agoThere is not a single major browser written in Rust. Even Ladybird, a new project, adopted C++.
- lmm 10mo agoFirefox and Chrome already contain significant amounts of Rust code, and the proportion is increasing.
- vbezhenar 10mo agohttps://github.com/chromium/chromium 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 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?
- 10mo ago
- wat10000 10mo agoMost of the world uses other languages because they’re easier, not because they’re safer.
- gpm 10mo agoThey're easier because, amongst other improvements, they are safer.
- wat10000 10mo agoSure, my point is the safety is not why they originally supplanted C and C++. It was seen largely as a tradeoff between ease of development and runtime performance. Memory safety as a goal of its own didn’t become prominent until much later.
- scuff3d 10mo agoI'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.
- vbezhenar 10mo agoOne could rewrite curl with Perl 30 years ago. Or with Java, Golang, Python, you name it. Yet it stays written with C even today.
- avhception 10mo agoYour 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.
- vbezhenar 10mo agoJava might not be the most popular VM in Linux, but let's talk Perl or Python. It's installed by default almost everywhere, it's probably impossible to find a useful Linux installation without these runtimes. So writing curl with Python makes perfect sense, right? It's memory safe language, good for handling inherently unsafe Internet data. Its startup time is miniscule, compared to typical network response. Lots of advantages. Yet curl is still written with C. I've never used libcurl and I don't know why is it useful, so let's focus on curl. Of course if you want C library, you gotta write it with C, that's kind of weird argument. My point is, there were plenty of better options to replace C. Yet people chose to use C for their projects and continue to do so. Rust is not even good option for most projects, as it's too low level. It's a good option for Linux kernel, but for user space software? I'm not sure.
- lawn 10mo agoPeople didn't use seatbelts before seatbelts were invented.
- estebank 10mo agoAnd when they were mandated, it made a lot of people very angry! https://www.cbc.ca/player/play/video/1.3649589 https://www.cbc.ca/player/play/video/1.3649589
- userbinator 10mo agoUnless it means sacrificing freedom.
- deleted 10mo ago[deleted]