20 ms·
What is Rust and why is it so popular?
- einpoklum 7y agoStackExchange Inc. making noise to distract from the deepening crisis with the public Q&A sites it owns. The post itself may be good or bad, I don't know - but I just can't bring myself to read their happy-go-lucky banter.
- mjw1007 7y agoWhat "deepening crisis" is this? Is it just the usual internet drama with a few people being unpleasant to each other and then storming off in a huff, or something more serious?
- setr 7y agoSome well-liked SF mod got randomly booted due to a CoC powerplay, and then everything exploded. Rules weren't followed correctly, mods getting kicked out or quiting in revolt, all sorts of corporate powerplays and misplays Basically the whole stack overflow administration is fucked, but also no one really cares because that administration is mostly invisible to the majority of SF users (developers coming from Google). Same way Wikipedia drama has never been cared about by anyone but Wikipedia mods. General pop will only care once the quality of the system degrades This article however probably has nothing at all to do with that, and is probably authored/published by a team entirely independent of the stack overflow mod administration.
- sdegutis 7y agoI’m on the fence to whether to care about any of this. On one hand I’ve no time for nonsense anymore. On the other hand, it sounds like it means SO will degrade (even more) because of it.
- setr 7y agoI don't think it matters at all unless you're an SF admin.. you and I are going to do fuckall to impact the situation anyways. I personally only care insofar as the situation is interesting. This is my onlooking entertainment. In terms of degradation, I suppose it depends on which side you're on. The admins imo are the ones pushing the rule-heavy and quick-to-close question methodology that stack overflow gets a lot of grief for -- the company seems to be trying to move to the more free-form moderation found on forums, where mods are gods (until ejected by the Supreme Leader aka CEO). Where it really makes sense to blame one mod vs another. IMO stack overflow benefits mainly from it's strict enforcement, and it's preference on serving answerers rather than questioners (the burden is on asking good questions, less on writing good answers.. rather, it's more assumed good answers will be written for good questions, whereas other systems like quora emphasize the opposite). So the loss of the mod community will cripple stack overflow in the long term, imo.
- einpoklum 7y ago* Many of the moderators left or suspended activity in October; almost none have returned. * A few more moderators have left this month. * Consequently, several sites have only a single active moderator or none at all. * Two key employees involved in moderation and community relations have recently been terminated. * Company management completely avoids any communication with the community. * One particular moderator who had been summarily terminated (not from a paid position) was slandered to the media by SE Inc. , has threatened legal action, and has reached an undisclosed arrangement with the company. The community has responded quite negatively to the little which is known about the arrangement (which does not include any admission of wrongdoing). This is not including unfounded rumors about where the company may or may not be heading business-wise.
- SeekingMeaning 7y agoRust newbie here. How do you fix the compile error for the example given? I imagine it has something to do with transferring ownership, but I’m not too sure.
- afandian 7y agoLots of these things that look like syntax problems are in fact design problems surfaced by the compiler. The `nickname` variable holds onto a reference to the substring of `name`. Subsequently `name` is modified (cleared). This forces you to think about the behaviour. Should the nickname remain constant even if the backing `name` string changes? Probably yes, so you'd take a copy at that point.
- Cyph0n 7y agoThe easiest fix is to clone the String, then build a slice from the copy.
- tspiteri 7y agoThe example won't compile because nickname is just a reference to the first three bytes of name, but then name is cleared, so nickname would be a bad reference. That are two ways to go around this: 1. Print the nickname before clearing the name so that nickname is still valid when you print it (swap lines 4 and 5). 2. Make nickname a copy of the first three bytes of name, rather then a reference to the first three bytes of name. let nickname = String::from(&name[..3]);
- edflsafoiewq 7y agoTranspose the print and clear statements.
- takeda 7y agoThe nickname works like alias that only shows 3 characters of the name. Before using nickname the code frees the name making both name and nickname invalid. The error here is use after free and one strengths of rust is to detect errors like this. In C such code would compile, what's worse, it would work and behave correctly most of the time. If your code was more complex (for example using threads) you would get a bug that the code would work fine most of the time, but once in a while it would display garbage.
- potatochup 7y agoI work in the embedded space, but the majority of my work is writing simuators, mathematical models and tests. One of the hidden benefits for us was that rust is suitable for both resource-constrained embedded code (we use a lot of C for this) and high-level desktop and cloud based infrastructure/sim/test code, which we would never consider writing in C. Serde is amazing, crates.io has so much good stuff on it, C interop is a breeze. We still use Python/matlab for exploratory and data-sciency work, but as soon as something lives for more than about 6 months, it usually gets re-written in rust.
- adamnemecek 7y agoNow switch to Julia instead of Python/matlab and you have a really solid stack.
- deleted 7y ago[deleted]
- locust98 7y agoJulia lost its momentum, and for good reasons: insuficient or rushed up libraries, no option for the generation of standalone executables and general overselling (by the way, bashing Python at every opportunity didn't lead to a higher volume of users)
- adamnemecek 7y agoIt didn't lose momentum.
- byt143 7y agoNot sure the data supports that ,: https://juliacomputing.com/blog/2020/01/06/january-newsletter.html https://juliacomputing.com/blog/2020/01/06/january-newslette...
- ChrisSD 7y agoI think one of the biggest benefits of Rust is it bakes in static analysis of code as a first class feature. Which means the language is amenable to analysis and you don't have to use third party tools to benefit from it. I also like some of the abstractions. They're clever in their simplicity. For example, an iterator over an array or vector is simply doing a for loop using pointers.
- Waterluvian 7y agoI'd like to understand what you mean by baked in. Not only does vscode need a plugin, it needs a language server running to do the static analysis. Are there analysis capabilities without the language server?
- UK-Al05 7y agoThe compiler by its self can do it, if you run it. I believe the language server is just for real time editor integration.
- Waterluvian 7y agoGotcha, thanks. This is too tangential to belong here. I need to go better understand what exactly the language server is doing if the compiler is able to provide all the details. Going to guess it has to do with partial/progressive analysis and supplying a programmatic interface to convert errors/warnings into squiggly lines rather than text output.
- steveklabnik 7y ago> I need to go better understand what exactly the language server is doing if the compiler is able to provide all the details. Converting it from what the compiler knows to the https://langserver.org/ https://langserver.org/ protocol. The long-term goal is to have the compiler be able to do this directly, but there's some stuff to do in the meantime.
- orf 7y ago
- zozbot234 7y agoThe more pressing question: What is Rust and why is it so popular on HN?
- rb808 7y agoI did an internet search for Rust jobs and it was near-zero. Would be nice but reality calls.
- orf 7y agoWeird, I did a search and I found 13,000 jobs mentioning Rust on Linkedin.
- alharith 7y agoIt's kind of how like when Go first bust out on the scene and every org that was "doing DevOps" claimed they had "Go in the building", the reality is you wrote CLI scripts and did 90% of your job in Java or Python. They may mention Rust, but doubt it's what you'll be solving the majority of business problems in.
- estebank 7y agoAt Commure we use Rust everywhere, from our backends to our cli tools. Any shell script longer than a few lines becomes a binary. The only place we don't use Rust is in the frontend, where we use JavaScript and TypeScript.
- takeda 7y agoI didn't a search in Indeed and found jobs like: - machinist - maintenance worker - crater/packer - painter I wish there was a better name, still better than go, although they successfully adopted golang so now it is easier.
- takeda 7y agoCan't edit now, but of course "didn't" supposed to be "did".
- lordleft 7y agoThe example of an error message in the blog post is the kind of thing that makes me seriously consider trying out rust. It's excellent. Are most rust error messages like that?
- ChrisSD 7y agoYeah pretty much. A lot of effort goes into trying to make error messages as clear and useful as possible. Also `rustc --explain` can give you more general details about the class of error and there's a website that does the same. E.g. for error E0502 mentioned in the article: https://doc.rust-lang.org/error-index.html#E0502 https://doc.rust-lang.org/error-index.html#E0502. It's still possible to hit some edge cases where error messages aren't as helpful as they could be. But these are considered bugs and so will hopefully be fixed.
- steveklabnik 7y agoMost of them are, yes. Some of them are not. We treat bad error messages as bugs, and track them, and have a few dedicated contributors working to make them better all the time.
- kibwen 7y agoWorth noting that Rust tries to set a high bar for error messages, so not just bad, but even pretty-okay-but-could-be-better error messages also get tracked as bugs. As a result, 1/6th of all open bugs in the Rust issue tracker are "diagnostics" (i.e. error messages) bugs, making it the single largest category (AFAIK): https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AA-diagnostics https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Ais...
- azdle 7y agoIn my experience, the vast majority are exactly like the error they show. Some are even better. I haven't hit a warning in ages that hasn't been able to be auto fixed by `cargo fix`. However not all of them are. Back in the pre-async/await days you'd end up with some really gnarly implicit types in some really big functions with lots of returns. Then sometimes you'd make a mistake on one of the returns and the compiler would assume that your mistaken type was the right one & point out all the places where the actually correct type was returned. Then you'd have to go hunt for where you needed to add a `as Box<Future<Item = _, Error = _>>` to get it to compile again. I haven't hit any issues like that since I started converting the gnarly stuff to infinitely simplier async/await code, but I have to imagine those kinds of issues are still lurking in other areas where you can't get away from complicated code. Even with that I whole-heartedly recommend anyone that's thinking about it just go try it out and/or read some of the book. It's a delightful language to work with. I have way more fun working with Rust than I have with any other language. It takes care of so much of the BS that I don't want to have to think about, so I can just think about the interesting stuff.
- jdlyga 7y agoRust using the LLVM toolchain is a real plus, which Clang also uses in the C++ world. The Clang and Rust compilers are basically frontends to LLVM, and any language that compiles using LLVM is translated to IR (intermediate representation). All code optimization is done on the IR code itself in LLVM, which both Rust and C++ compile down to before being compiled further into assembly. That means that the same effort that goes into optimization in the C++ world for Clang is shared by the Rust community too, and any other compiler that uses LLVM.
- steveklabnik 7y agoWe have started doing our own optimizations too: https://blog.rust-lang.org/inside-rust/2019/12/02/const-prop-on-by-default.html https://blog.rust-lang.org/inside-rust/2019/12/02/const-prop... Your overall point is absolutely correct though. We couldn’t have done this without LLVM.
- galangalalgol 7y agoCan you comment on the current state of non-aliased related optimizations? The issue tracker is byzantine on that one and i can't tell if or to what degree those optimizations are now done.
- shepmaster 7y agoI don't know the current state, but I hang out in the Zulip room dedicated to the work on the optimizations - https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt https://rust-lang.zulipchat.com/#narrow/stream/189540-t-comp...
- steveklabnik 7y agoThey’re not on right now.
- kibwen 7y agoRight now they're disabled, pending patches on the LLVM side. You can keep track here: https://github.com/rust-lang/rust/issues/54878 https://github.com/rust-lang/rust/issues/54878
- alerighi 7y agoRust is a great language if you use for what was intended, system programming and as safe substitute of C and C++. But it's not the answer of everything, to me it's nowadays abused in a lot of projects, there are instances of project where using Rust not only doesn't make a lot of sense but also can be slower than another languages, there are cases where Go is better, other where Node.js is better, other where Python is better, other where Java is better, etc. To me the Rust community seems to want to argue that everything should be rewritten in Rust, just because Rust solves every problem, while it's not.
- s_y_n_t_a_x 7y agoOne major reason for the recent explosion is it's first class WASM support, especially since it doesn't need a GC. It just has language features that make sense for the web, which is a huge sector. (parallelism, memory safety, speed, JS interop)
- Ididntdothis 7y agoI think that’s ok. It takes a while to figure out where a language is ok and where it’s maybe not ok. Also by doing stuff it may not be perfectly suited for right now there is an incentive for improving things.
- MadWombat 7y agoOK, I will bite. If I had to come up with a case where Python is better than Rust, I would say with rapid prototyping and scientific computing. If you just want to try a few things out, python has faster development cycle and if you want to do some super clever math python has better library support. With a bit more mind stretching, I can make a case for Go with a bit more mind stretching. If you want to write a massively parallel network server of some sort you might be better off with Go, especially if you want to use protobufs and grpc. But what would be the case for Node and Java?
- terminaljunkid 7y agoEcosystem.. I don't know about node. But there's whole lot of java code and libraries out there. Otherwise why would people build other languages for the JVM? Ease of writing; Most of code is okay having a GC. But time to produce working code (not necessarily 100% correct code) is important. Rust is created for low level stuff. It is wrong to expect web backend programmers to deal with ownership, stack-vs-heap and all.
- alxlaz 7y agoOver the last couple of months I've been slowly, but steadily playing with Rust. I work on embedded systems and while it's gaining traction only slowly, it feels to me reasonably likely that we'll be seeing non-trivial applications in the next 8-10 years. I doubt that we'll see it used for low-power/resource-constrained firmware, but lots and lots of embedded systems are now bulky Linux boxes with years of uptime, and I can see Rust making inroads there. It's not a bad idea to be ready for this, just in case it turns out to be a revolution. Honestly, I like it, and for all the non-hyped reasons. Like ownership. Lots of us in the embedded space aren't so impressed by the extra memory safety because, if you allocate all your memory statically, there are fewer ways to screw things up with references, and it's a lot easier to do bounds checking, so fewer bugs slip in. Not that "even fewer" isn't good, it's just that the impact is less dramatic than in application code. But: the borrow checker still pesters me about something I've written every once in a while. And every once in a while, what it pesters me about is a data race that would have definitely bit me in the back sooner or later. It has no security implications, I guess, and it wouldn't crash my program, but it's still wrong. Yay! Or like traits, which are just so refreshingly sane. Lots of people are hung up on security and segfaults, and spend far less time talking about a far less categorical property: the conventions that Rust enforces make it easier to write correct code. Sometimes it's not straightforward code, mind you, but "works right" trumps "fits in a single line" in my book... In many ways, Rust is what C++ could have been if it had not been designed by saying yes to everything. I guess it's not there yet, but there's a chance it might be. On a more, uh, philosophical note, I think it's pretty cool that our industry has been granted a second chance in this regard. We've already been given Ada, and we missed the chance to adopt it on a wide enough scale to make a difference. Maybe we won't miss this chance.
- dorfsmay 7y ago> I doubt that we'll see it used for low-power/resource-constrained firmware I'm curious what your reasoning is for saying this?
- zozbot234 7y agoAre you going to use Rust on a PIC12 with 32 bytes of data memory and max 256 code instructions? Of course not. Assembly is still king in this low-powered embedded class and will stay as such for the foreseeable future.
- _wldu 7y agoIt's a programming language and it's not popular.
- cheapskate22 7y agoHaha
- sramsay 7y agoAny day now, it's going to overtake Logo on the TIOBE index. You just wait.
- devit 7y agoThe reason that it's popular is that it's immediately clear that Rust's model of memory safety without a GC and safe concurrency is the best way to create a programming language since it unifies the memory safety of GC languages like Java, the efficiency of C and the concurrency of message-passing systems like Erlang in a single language that has none of the drawbacks of those systems. Before Rust, everyone simply assumed that it was impossible to create such a programming language since it would have otherwise been what everyone used, and now that it turns out that it's possible, it's clear that it's the best solution and what should be used in the future whenever possible.
- baby 7y agoRust for me is the modern C/C++, as much as Go is the modern Java. I see no point going back to C/C++ now and I will now reject any job offers that deal with these languages.
- vperez 7y agoGreat article. One nitpick: > One of the biggest benefits of using a systems programming language is the ability to have control over low-level details. I think this is a misguided conflation of "systems programming" and "low-level programming", those are separate things. See http://willcrichton.net/notes/systems-programming/ http://willcrichton.net/notes/systems-programming/
- calibas 7y agoAh, the eternal argument over what qualifies as "low-level". I think we can all agree it's not Javascript, but beyond that opinions vary greatly and it's mainly a semantic issue.
- ncmncm 7y agoWith current languages, we should speak more about range. C++'s and Rust's ranges stretch from C's at the bottom up to near ML's. Java is stuck in a little space in the middle.
- jokoon 7y agoThis language is awesome, but I'm quite conservative when it comes to syntax. I don't like how Rust is trying to move away from C when considering syntax. I tend to prefer languages that can adopt the "C flavor". Python, in my view, does this very well: its syntax is simple, because it borrows a lot from C in its "flavor". Rust is not doing that, and that's a hurdle. In my view, the "C flavor" is very important because it's a standard of how people are able to read code. This has nothing to do with the C programming language, I'm just saying that simplicity is what made C popular and easy to use. I can understand that Rust brings very nice innovations, but in my view it should have done so while keeping the "C flavor" as most as it could have. I admit it's a conservative view, but I tend to believe that a language can be more easily adopted if at its most basic level, it's simple to read for beginners. Rust is not great: I'm not talking about its learning curve, I'm just talking about the "flavor". A language is a tool of expression and communication, features matter less than readability.
- adamnemecek 7y agoRust is C + ocaml. C doesn't have some of the features of Rust and in those cases it makes sense to adopt the ocaml syntax.
- pornel 7y agoRust has quite C-like syntax IMHO, with a few important fixes. Types are easier to write and don't have typedef parsing gotcha. Array of 10 functions returning functions in Rust is `[fn() -> fn(); 10]`. I'd faint trying to write such type in C. if (foo) bar(); is if foo {bar();} Same length, but without possibility of "goto fail" error. Rust may look ugly, especially with generics, but on the technical level there isn't much wrong with the syntax. It's quite readable once you know it. And you can grep function definitions!
- wtetzner 7y agoI'm not sure I follow. Rust syntax seems far more similar to C than Python syntax does. What parts of the Rust syntax do you feel depart from C-style syntax?
- 7y ago
- amelius 7y agoSome problems which are harder in Rust: https://stevedonovan.github.io/rustifications/2018/08/18/rust-closures-are-hard.html https://stevedonovan.github.io/rustifications/2018/08/18/rus... https://news.ycombinator.com/item?id=16442743 https://news.ycombinator.com/item?id=16442743
- jamil7 7y agoI like everything I see and read about rust but I'm unsure where I'd fit it into my work. Does rust have a future in areas like backend web development or mobile?
- steveklabnik 7y agoMy employer, Cloudflare, uses Rust as part of our mobile app for 1.1.1.1. It’s still rough around the edges, you basically integrate Rust like you would a C dependency, but it’s been working great. There are some backend web development deployments at other companies, but the ecosystem has been changing a lot over the last year. It’s starting to settle down though. Expect more “Flask” and less “Rails.”
- unlinked_dll 7y agoit's pretty great for non trivial CLIs. I was using it at my previous org for a tool to take JSON config files to generate a bunch of C++ boilerplate so we could rapidly prototype different ideas.
- Myrmornis 7y agoWow, that is an extremely well-written brief introduction to Rust. I love the way it manages to address some more technical (e.g. FFIs, distinction between borrow-checker and other parts of compiler) but important concepts despite being so short. Thanks very much Jake Goulding if you're reading.
- shepmaster 7y agoYou are quite welcome! Hope to see you writing some Rust sometime!
- Myrmornis 7y agoI have tried one project so far: https://github.com/dandavison/delta https://github.com/dandavison/delta
- deleted 7y ago[deleted]
- psv1 7y agoBecause the StackOverflow survey which Rust keeps winning defines "Most Loved" as: > % of developers who are developing with the language or technology and have expressed interest in continuing to develop with it Because there aren't that many Rust jobs, almost no one has to use it. Which means people either try it and leave, they like the language and stick around, or they never use it (the overwhelming majority of developers). This leads to the Rust being the most loved language by the above definition, which is completely different from "popular" (as in the title of the OP). If I make up my own language that I plan to never stop using, even if no one else ever touches it, I'll get 100% "Most Loved" on StackOverflow's survey.
- shepmaster 7y agoYup, which is what I alluded to with "However, the roughly 97% of survey respondents who haven’t used Rust" :-)
- marcosdumay 7y agoWell, yes. There are plenty of popularity metrics there already, this one is about something else. As you said, mainstream languages won't win this one. But it is a valid metric anyway, and there is plenty of merit on winning it.
- psv1 7y agoThink about this - if a bunch of people hate a language and stop using it, the following year that language's "most loved" score will increase. I wouldn't call that merit, it's just a bad metric.
- marcosdumay 7y agoYes, if people can simply stop using a language, it will not be hated. That's how it works on real life too. But most of the time, people can't stop using languages.
- deleted 7y ago
- taxtropel 7y agoThe rust community is it's own worst enemy. Very toxic, non inclusive. If you object in anyway you get a stream of "but muh coc"
- 0xdead 7y agoDoes anyone know how StackOverflow measures "love" towards a language?
- shepmaster 7y ago> % of developers who are developing with the language or technology and have expressed interest in continuing to develop with it https://insights.stackoverflow.com/survey/2019?__hstc=188987252.63a31c9ff9cab1812469cb8b44e5d5f1.1579486003016.1579544559356.1579630210345.5&__hssc=188987252.1.1579630210345&__hsfp=3030258021 https://insights.stackoverflow.com/survey/2019?__hstc=188987...
- sethev 7y agoI like the fact that Rust has a set of libraries (crates and the standard library) that provide a lot of the features that you end up re-inventing if you stick with C. Even C++ is pretty fractured in this regard. A lot of why this is hard in C/C++ is memory management. Even if you had a package manager it would be hard to compose libraries together unless they were designed together (like boost for C++).
- ncmncm 7y agoI see that you have no experience with C++ in the past decade. There has been no fragmentation in C++ resource management since C++11.
- sethev 7y agoThat's fair - last time i used C++ in earnest was around 2007. Unless they broke compatibility, it would still be opt-in, though, right? Nice thing about Rust is that the resource management approach is built-in and enforced by default.
- ncmncm 7y agoEverything in C++ is opt-in. The Standard C++ Library supports user-managed allocators for all the containers, heavily used in embedded, low-latency, and real-time applications to get deterministic performance. Lack of standard support for user-provided allocators indicates immaturity. E.g., C++ lacked them until 2011.
- pjmlp 7y agoI like Rust, however as usual the article fails short of mentioning Ada, and GC languages that share the same resource management capabilities as C++, alongside their GC.
- shepmaster 7y agoI wouldn't want to mention any language I don't have experience with for the risk of mis-speaking. I also tried to minimize talking about any specific language where I could.
- pjmlp 7y agoFair enough. I just made the point, because from security point of view, we all have to gain no matter what safe systems programming languages get adopted. It doesn't need to be Rust vs the others, in what concerns improving the current state of IT security. For example, Nvidia is now adopting Ada/SPARK for security critical firmware.
- say_it_as_it_is 7y agoI realize /r/rust (Reddit) isn't representative of the entire Rust community but it's given me a really bad impression of Rust culture.
- psv1 7y agoReddit is great for memes and humour, not much more. Go through any subreddit on a topic that you know well, and you'll likely be disappointed.
- marcosdumay 7y ago/r/haskell is pretty good. /r/python isn't great, but not bad either. There are subredits of every kind, even great ones. But they change with time.
- 12thwonder 7y agoWhat influential applications are written in rust? For c++, there is llvm, chrome, game engines, I feel like c++ is standing very strong in any of these fields still, why is that? Do u think it’s going to change soon?
- ncmncm 7y agoNo essential programs are in Rust, in the way that e.g. Docker is in Go, or your examples in C++, and none are on the horizon unless Cargo becomes a popular way to build C++ or C programs. Rust is popular to post about on HN, but the number of people actively coding it is at least 4 orders of magnitude fewer than mature languages, and the number of people adopting it, likewise: the number of people adopting C++ is many times larger than the number who have ever even heard that Rust exists. Those numbers will take many years to change, if they do. Just as likely, some new hotness will pop up and distract the early adopters; Rust could very possibly fizzle out. (That would be a shame unless the new hotness were enough better. Rust++?) Promoting Cargo as a way to build C++ and C programs could be a way to establish Rust underpinnings. Cargo is better than most other build systems now used for C++, and with C++20 getting modules, the fit is improving.
- catach 7y agoSuch momentum is not so easily overcome. The roots of Chrome's codebase and LLVM are both significantly older than the very beginning of the Rust project, for example. If Rust manages to actually supplant C or C++ it would very likely require decades and generational change.
- reirob 7y agoWell, I would guess FireFox, sort of. If I recall correctly Rust was created to rewrite FireFox and make it better. The Oxidation page [1] seems to give an overview where it is. [1]: https://wiki.mozilla.org/Oxidation https://wiki.mozilla.org/Oxidation
- janered 7y agoStill not hyped. The article does not show anything special or new about the language that would attract me personally. Type inference -- nothing new and exists in many other languages. Actually how about compile type inference not only in function bodies? :) Functional niceness with iterators -- also nothing new. It can be even more succinct and elegant in Scala for example. But Scala is not as fast you'd say! Yeah, so what? Python is not as fast as Scala, so. Control over low-level details is something that exists and should be in any system-programming language. How is that even a benefit? It is a niche feature. Memory safety? You can circumvent it by using "unsafe" and as recent Actix case shows it can propagate really deep. Should I read the code of any other Rust library now? What if I am a programmer newbie driven by the hype without a clue what does memory safety entail? What-ifs... I won't talk about compile times and the fact that in order to compile some cli tool one has to download ~200mb of rust "stuff". This is simply insane and I refuse to understand how is this considered to be not an issue. Rust ecosystem is probably its strongest point right now which is somewhat funny because it grew out of beliefs in the above "benefits". So, not hyped, sorry.
- qaq 7y ago"It is a niche feature" looking at C and C++ usage that niche is pretty huge.
- jane_red 7y agoIt is, and C/C++ are used in so many areas which are not system programming right? Being a scientific Python backbone is one of them for example. My claim was that it is nothing out-of-ordinary. In fact, I really dislike the article's somewhat evangelist attempt to target newbies. These so-called benefits existed and do exist in so many other languages. The only thing that Rust comes with is memory safety which on closer look is actually an illusion and is a pretty evil one. I would praise Rust for speed, yes. For ecosystem, yes. But that's it.
- qaq 7y ago"My claim was that it is nothing out-of-ordinary". Well I guess will agree to disagree there are pretty prominent cases of very capable people trying to do a project in C++ and failing and then leveraging Rust and actually delivering.
- clktmr 7y agoAs an embedded systems engineer I have very mixed feelings about Rust. There are a lot of things to like, but Rust seems to miss the point why C++ didn't replace C and will fail at that for the same reasons. I wish for an economic, unexciting, conservative evolution of C, which I don't see in Rust. I could imagine C++ being replaced by Rust, though I don't think borrow checking is the future of programming. Another point is the tight integration with cargo, which may lead to the same dependency problems that npm has. But it will cause significantly more struggles because of licensing issues. While most npm code was running on servers, it didn't matter. In the embedded space companies typically insist to have every library checked by a lawyer before it gets shipped with the product, which will make cargo essentially useless. The last one is the community. In fact I think a programming language is to the largest part about the people using it. And Mozilla sadly created a hype and a hostile community by aggressively evangelizing the language.
- steveklabnik 7y agoJust so you know, there's tools that let you check the entire set of licenses of your dependency tree, and whitelist/blacklist them. Amazon implemented one after they started using Rust more seriously.
- zozbot234 7y ago> I wish for an economic, unexciting, conservative evolution of C That's not a bad description of Cyclone, Rust's direct predecessor. It went nowhere because it was so "conservative" over C as to be deeply unintuitive, and it lacked features that matter to modern programming. Rust is nonetheless far less complex than C++, and that in itself makes it a plausible C replacement.