7 ms·
Heh, someone better tell Mozilla that it's time to pack up Firefox and go home then.
by vvanders 8y ago
Heh, someone better tell Mozilla that it's time to pack up Firefox and go home then.
- platinumrad 8y agoServo is just one project. How does its existence, or the existence of whatever other components of Firefox that use some amount of Rust, encourage the adoption of Rust by the general programming population? If having a high profile industrial backer makes a language not niche then OCaml is not a niche language. (I wish this were the case.)
- vvanders 8y agoWhat makes you think that the languages which Rust displaces aren't also niche? I used to write a lot of C++, every team I worked on always had a problem finding people who could write native code well, I'm pretty sure that hasn't changed in ~3 years or so. Why does something have to be wildly popular to be considered successful? I've found most of this industry is more about using the right tool for the job then trying to fit one language into every domain space. That said I think there are a few places where you'll see Rust really succeed in the next 3-8 years: 1. Domains that have hard memory or performance constraints. Rust matches C/C++ for performance(and I say this as a hardcore C++ perf nut) but without the segfaults/corruption(unless you step into unsafe land). 2. Products that need to go to multiple platforms but can't afford a GC. Rust has by far the best cross-platform development story I've seen in a natively compiled language. I've personally build things that run on WASM/Win32/OSX/Android/Linux across a wide range of hardware and embedded in C#/Java/C++/C. 3. Places where safety/memory corruption is unacceptable. You just get less of these from Rust, full stop. Yes you can do it in C/C++ but you better be willing to have a QA org larger than your dev team. Firefox is a perfect example of how these various concerns intersect. I used to be a serious C++ developer working on high performance, memory constrained platforms. In the past two years anything green field for me has been Rust based and I've been 100% satisfied. In both personal projects and some professional work Rust has never come up short. Is it hard to write? Sure. Do I spend less time debugging/tracking down mem corruption/dealing with poor ownership? Hell yeah.
- platinumrad 8y agoI think Rust does need to aim for strong mainstream acceptance. As I'm sure you've experienced, lower level programming, in contrast to web development, is a (justifiably) conservative field with regard to choice of tools. For example, "I write ANSI C because ANSI C is the standard" is an attitude I frequently encounter. ("I write ANSI C because everything has a compiler for ANSI C and it never changes" is probably what a lot of them are getting at.) Things like breaking changes, however minor, and "just use nightly" are anathema to this crowd. Yet this is the domain that could arguably benefit from Rust the most. I think Rust needs a strong foothold somewhere to prove its maturity before it can attack the C/C++ "heartland". >What makes you think that the languages which Rust displaces aren't also niche? Any definition of "niche" that includes C or C++ is meaningless.
- vvanders 8y agoEh, depends on where you work, in gamedev land we loved to play fast & loose with nightly/etc(within reason). Heck, I'd argue that crowd is even wilder than the JS ecosystem, it's just not as public. Really, you might want to check your echo chamber a bit. Native programming is not the norm in the industry, most fresh grads have touched C or C++ once or twice and know the theory but none of the practice. Heck back when I was in college we had people coming to our community college to take the C course there since UCSD didn't offer it as part of their curriculum. Now, does the majority of software run on C/C++ based systems? Totally. However I would posit that the number of people who build those systems is much smaller than the number of people working in Java/Javascript/Python/C#/PHP/Ruby/etc. Your LoB app doesn't need the performance of C++, you just use a DB that's built with C++. You may use ngnix but the webserver behind it is probably written in Java. There's an inverted pyramid in software. The lower down the stack you go the more specialized and domain specific you get. Component/app/framework reuse means that you need less people at the bottom then you do at the top otherwise we'll all be fullstack web/frontend/backend/driver/kernel/vhdl developers. Either way I think Rust has a rich and vibrant community which isn't going away anytime soon. Would it be nicer to see wider adoption? Sure, but I'm not worried about it either.
- Thaxll 8y agoRust code in Firefox is tiny compare to c++, probably less than 5%.
- deckiedan 8y agoThe really awesome thing with rust is how easy it is to make library code which can be called from any language including C and C++ (in most situations) - just as easily as writing a library in C or C++. In some situations even easier than C++. Thus I can easily see rust replacing C/C++ as the default language for writing 'high performance libraries' in, for use in Ruby/Python/etc. It's usually more similar to what higher level programmers are used to too. You get to use functional code for a start. But also exactly as in Firefox - libraries / modules can be written in Rust, and then brought in to replace existing C++ code. And I'm sure the ergonomics of this process will improve too. If a C++ project lead / manager can say, in all honesty: "The x component needs to be re-written for whatever reason - either major refactoring for a desired feature, or performance, or to split out to use in another product. We can either do it in C++, or Rust, and Rust will garentee no new segfaults, we can trivially parellelise a lot of it for improved performance, etc. etc. with no major disadvantages..." then Rust will inevitably grow.
- vvanders 8y agoThere's another thing I've noticed with Rust. I get a lot of some code benefits that I've seen from functional languages(understanding inputs/outputs, preventing mutation) from Rust's ownership model. If you want full function? Just don't pass/use anything that's mut. Need to break that contract for performance? You still have single-ownership which gives you 90% of the above but with no performance penalty. You still get logic errors/etc but it's a great no-compromise solution when you can afford the time to get your ownership right.
- mmirate 8y ago> If you want full function? Just don't pass/use anything that's mut. Not quite. There are still mutable globals (they just have to have to have the appropriate "I'm MT-safe" marker traits); and there's nothing preventing any function from performing any I/O that it desires. Even better, once specialization lands, generic trait-functions will be able to behave differently when called on different types, even if the special behavior isn't valid given only the public type-signature's assumptions.
- adrianN 8y agoYou could have said the same thing about XUL.