5 ms·
It does keep rising in popularity, but is that coming from folks actually using system languages like C, C++, Ada, and Forth? I'm guessing only a portion. There
by throwaway7645 10y ago
It does keep rising in popularity, but is that coming from folks actually using system languages like C, C++, Ada, and Forth? I'm guessing only a portion. There's a difference between a web developer using Rust enthusiastically for hobby projects and a seasoned C coder switching to Rust for a professional job. In fact, a lot of the projects I've seen in Rust (ex: Dropbox) are commonly being done in Go as long as the GC isn't an issue.
- 46Bit 10y agoYou have a point. I've done medium-sized C projects in my degree, but my professional background is mostly web. I've been using Rust heavily for 10 months. I think that if you want to use it for web stuff you very much can, but the language is more immature than it might first appear. If the community keeps going the way it is, I hope to work with it commercially by 2020. The most promising things I've read about it as a serious systems language are from Cambridge Consultants [1,2], but there's a lot of ongoing work to make it ready for embedded work. [1] http://blog.cambridgeconsultants.com/wireless-product-development/presentation-mozillas-rust-and-why-we-love-it/ http://blog.cambridgeconsultants.com/wireless-product-develo... [2] http://blog.cambridgeconsultants.com/wireless-product-development/will-cc-ever-rust-away/ http://blog.cambridgeconsultants.com/wireless-product-develo...
- tmccrmck 10y agoWhy use Rust for web development? There are very few web back ends in the world that need the speed of C++ or Rust. Java, C#, Go, Haskell, OCaml are much easier to ramp people up with and hire for.
- majewsky 10y agoExactly. Sneak some Rust code into your business-critical systems for that extra job security! :)
- 46Bit 10y ago:-) I've been trying to keep the nuance in my comments here. When I said, "I think that if you want to use it for web stuff you very much can," I'd emphasise the, "if you want to." At the moment a lot of hobbyists are doing web stuff in Rust. Commercially I think usage would be in the same vein as the common pattern of rewriting Ruby services in Go if it starts to limit performance.
- curun1r 10y agoRust is also pretty attractive for use in AWS Lambda and Google Cloud Functions. It's ability to strictly control memory usage and make the most of CPU resources is really powerful in an environment where you're billed based on memory and CPU time. If you've got a particularly hot lambda function, rewriting it in Rust is a pretty simple way to save a bunch of money.
- flukus 10y agoIf rust ever gets to the point where it's not much harder to write than java/c# then why not got for the fastest one and avoid performance death by a thousand cuts? A millisecond here and there can add up. And then there's the environmental cost of slower code. How many tonnes of CO2 emissions are higher level languages responsible for daily?
- tmccrmck 10y ago> If rust ever gets to the point where it's not much harder to write than java/c# then why not got for the fastest one and avoid performance death by a thousand cuts? Sure. If it's just as easy for the task then why not? But I wouldn't recommend Rust for web development for the same reason I wouldn't recommend C++ for web dev: complexity. Obviously, this is entirely subjective but I don't think either language will ever be easier to write than Java or C#, especially for beginners. I used to TA a freshman data structures class. I can't imagine ever going to a class of new programmers and trying to explain to them when to use Rc<RefCell<Vec<T>>> vs. Rc<Vec<RefCell<T>>>.
- 46Bit 10y ago> I used to TA a freshman data structures class. I can't imagine ever going to a class of new programmers and trying to explain to them when to use Rc<RefCell<Vec<T>>> vs. Rc<Vec<RefCell<T>>>. I'm interested - how do you teach it? I would have thought that the type system could make these things easier to visualise rather than harder, but then I don't have teaching experience.
- 46Bit 10y agoA friend pointed out some reasons, in particularly the safety stuff, that would make Rust unsuitable.
- Rusky 10y agoI'm not saying this makes Rust as easy as Java or C#, but I don't think `Rc`/`RefCell` types are the cause, nor for that matter the solution to the cause. Idiomatic Rust makes single-threaded interior mutability very, very rare. I don't remember ever once encountering the dilemma of "Vec<RefCell<T>> vs RefCell<Vec<T>>", in my own code or elsewhere. In fact, my current project (https://github.com/team-worm/spice https://github.com/team-worm/spice) involves an HTTP server written in Rust. Like you suggest, managing state across requests was one of the harder parts (both for myself to work out fully and for a team member who started with no Rust experience to grasp). However, much of that difficulty was intrinsic to the problem- the HTTP library we use is multithreaded, so for correctness we have to synchronize access to the state. Instead of discovering this by way of race conditions or hard-earned experience, Rust enforces it for us. Team members who have never used Rust before can be trusted to go in and work on the server without worrying about causing subtle concurrency bugs. They hit the brick wall of error messages instead.
- xiphias 10y agoRust is the first language since C++ that can improve/not hinder runtime speed while making development safer, so I definately see its future. The only problem is that the compiler is very slow now, so it doesn't scale to large code bases, which is a no-go in my company. Hopefully the Rust team understands that this is not only a would-be-nice to have feature (I see learning the borrow checker as a smaller problem)
- biokoda 10y ago> The only problem is that the compiler is very slow now, so it doesn't scale to large code bases The way of working with that is use cargo check command which is much faster and splitting your problem into multiple crates so you don't have everything in one giant project. Which is what tends to happen in large code bases anyway. Also they are putting quite a lot of work into making it faster. Before you get to that large code base it will be better.
- eridius 10y agoI believe incremental compilation is already being worked on, which should speed up your compiles (well, the first compile would be slow, but subsequent compiles would be faster).
- computerphage 10y agoA limited form of incremental compilation is already available on nightly. And yes, more is coming.
- deleted 10y ago[deleted]