4 ms·
That is exactly what we thought about C++. We, too, believed that C++ fixed all those problems with both low-level programming in C, and the "messy" programming
by pron 5y ago
That is exactly what we thought about C++. We, too, believed that C++ fixed all those problems with both low-level programming in C, and the "messy" programming of the "application generators" of the time; it lets you clearly express intent and yet helps you avoid shooting yourself in the foot as happens in C. Anyone who truly believes that Rust is a great language for the average applications developer, clearly has not met one.
- est31 5y agoI think you have a point that yes, programming languages depend on the domain a program is in. If the program only handles up to 10k customers, it can be programmed in javascript and can indeed keep its entire database in RAM. sqlite even has a mode for this. A LOT of custom software is in this "small" domain. However, when you get to millions or billions, maybe you have to optimize and create a backend. What should this backend be written in? Previously the answer might have been C++. But now it's Rust. Personally, being a Rust enthusiast, I think that Rust's benefits don't just unleash when you think about performance, but also when you think about large codebases. Such codebases are usually the scene for refactorings. In a dynamic language like js, these are extremely hard to pull off. In Rust, the compiler won't stop yelling at you until you have cleanly finished the refactor. I love refactoring Rust codebases, even ones I didn't write, while in C++ or other languages it's extremely annoying. And note that while C++ enthusiasts might have believed that everything should be C++, not everyone followed them. Many people still stayed with C. Many still do even with Rust around. But there is a small group of people for whom Rust is such a great improvement that they take the portability cost and switch to Rust. Linus is heavily anti C++ for example, but he's open to adding Rust to the kernel.
- golergka 5y ago> However, when you get to millions or billions, maybe you have to optimize and create a backend. What should this backend be written in? Previously the answer might have been C++. But now it's Rust. Neither Facebook, nor Instagram or Slack are primarily built on C++ or Rust though. And many other products that I can't as confidently remember from the top of my head aren't.
- est31 5y agoFacebook originally did compile their PHP to C++ though. https://en.wikipedia.org/wiki/HipHop_for_PHP https://en.wikipedia.org/wiki/HipHop_for_PHP Only later did they introduce Hack and HHVM, which compiles a PHP dialect in a just in time fashion. My point is that once you reach scale, and your computer bill becomes significant enough, you'll really want to use efficient languages.
- hu3 5y ago> However, when you get to millions or billions, maybe you have to optimize and create a backend. What should this backend be written in? Previously the answer might have been C++. But now it's Rust. Now it's Rust based on what? Uber backend is almost entirely built in Go. And so are many other services handling billion plus requests a day written in other languages. Perhaps Rust advocates know something that Uber engineering does not.
- est31 5y agoGo usage proves my point. It's statically compiled. In fact, Google wanted a language in the same performance class as C++ but that was easier to teach to college graduates. Rust is also such a language. Furthermore, when Uber got started, Rust hasn't even been available.
- hu3 5y agoRust being easier to teach than C++ is a very low bar to clear. And for the record, when Uber got started Go wasn't available either.
- zozbot234 5y ago> Anyone who truly believes that Rust is a great language for the average applications developer, clearly has not met one. What's a better general-purpose language for this mythical "average" developer? Java/C#? Rust has the same level of memory safety, and adds data-race safety that these languages do not have out of the box. Go is in the exact same boat, btw - memory safe for sequential code, but concurrent code is tricky since unsafe shared access is ubiquitous in real-world Go code. Haskell, Agda and Idris could provide more safety but are not approachable to the "average" dev.
- pron 5y ago> Haskell, Agda and Idris could provide more safety but are not approachable to the "average" dev. You (rightly, I think) place Idris (and Agda, although that's more a proof assistant than a PL) beyond the reach of the average developer, and also, apparently, Haskell -- arguably a simpler language than Rust, but never mind -- but not Rust. And that's my point and, I guess, our point of disagreement. If you think that, on that spectrum between, say, Python and Idris, Rust is at a good level for the average application developer to the point where maintaining high-level applications written in Rust would ever be cost effective, then I think you are out of touch with the realities of the software industry and the economic forces that shape it. I thought the exact same thing as you twenty five years ago: C++ was obviously the right language for the average developer -- even more so than, I don't know, Delphi or Visual Basic -- wasn't it? > What's a better general-purpose language for this mythical "average" developer? I don't believe any low-level language will be cost-effective for application development for the foreseeable future, if ever, and the average developer is anything but mythical (I mean, embodied as a single person, perhaps, but I'm talking about teams). > Rust has the same level of memory safety It doesn't (due to much more prevalent reliance on unsafe as well as FFI), but that's very much beside the point because, as you acknowledge, safety is not what it's about.
- ta_ca 5y agosimplicty is important, but i believe it is not the most important metric for a PL and have no problem with complex PLs. the question; is it worth the trouble? c++s failure is not the complexity but c++ being one of the least orthogonal languages out there. in c++ you are able to compose two great things/ideas (other than my only options are c and c++ this is the biggest reason i prefer c++ over c) yet the end result is not more but less.