In Rust we trust? Yes, but we want better tools and wider usage, say devs
- Reference: 1587391267
- News link: https://www.theregister.co.uk/2020/04/20/rust_developer_survey_results/
- Source link:
Rust is the "most-loved" language, the [2]StackOverflow research says, and has been for four years in a row, but the new study shows that one in five Rust developers do not feel productive in the language. The top reasons cited as barriers to adoption were the need for better training and documentation, improved libraries, and more IDE integration.
"As a small business, even 4-6 weeks to become productive is a lot to ask," said one respondent.
The survey was conducted in December 2019 and received 3,997 responses – nearly 2,000 fewer than the [3]2018 survey achieved. Of those surveyed, 27.6 per cent use Rust daily and a further 40.9 per cent at least weekly. The most common role for a Rust developer is back-end web development, followed by distributed systems and embedded devices.
Fifty-five per cent of Rust users develop on Linux, 24 per cent on Windows and 23 per cent on macOS. Visual Studio Code is the most popular IDE with 34.9 per cent share, followed by Vim (23.6 per cent) and IntelliJ (21.1 per cent), with the latter option being an [4]open-source plug-in for IDEA, CLion or other IntelliJ products. The targeted platforms include Linux (36.9 per cent), Windows (16.3 per cent), macOS (14.7 per cent) and WebAssembly (14.4 per cent).
Developers declared themselves very happy with improved Async I/O in Rust – a key feature – but most cited only "some improvement" in other areas, including adoption level, compile time, IDE experience, library support, documentation and tool support.
Why is Rust relatively difficult to learn? The 2018 survey asked users to rate the difficulty of various topics, showing that many find ownership and borrowing, lifetimes, macros and unsafe code particularly challenging.
[5]
Users rate some Rust concepts as difficult to grasp
It seems evident, though, that despite the enthusiasm of developers who've become proficient, adoption remains limited. Redmonk analyst Stephen O'Grady [6]remarked in January "the shiny language that many have argued should be used as the basis for more core infrastructure projects moving forward remained flat" in the programming language rankings. "The question then is whether Rust's technical differentiation from Go, albeit with an arguably longer learning curve, will be enough to allow it to outperform its most serious current rival for modern infrastructure workloads," O'Grady said.
The frustration for Rust proponents is that lack of adoption is cited as the biggest deterrent to further usage. The language would benefit from take-up by a major project in order to break through. Google Fuchsia (a possible successor to Android) perhaps? Unfortunately, the [7]official programming policy says, while praising the memory safety and asynchronous features of the language, that "none of our current end-developers use Rust. Rust is not a widely used language. The properties of the language are not yet well-understood, having selected an unusual language design point (e.g., borrow checker) and having existed only for a relatively short period of time." This drives the conclusion that "Rust is not supported for end-developers", though it is "approved for use throughout the Fuchsia Platform Source Tree" other than the kernel. By end-developers, Google means people writing software for the platform outside the core source code. The most favoured languages are C, C++ or Dart for end-developers.
Rust is loved and its language design widely admired, but not yet used as widely as its merits deserve. ®
Sponsored: [8]Forrester Build a Digital Experience Portfolio
[1] https://blog.rust-lang.org/2020/04/17/Rust-survey-2019.html
[2] https://insights.stackoverflow.com/survey/2019#most-loved-dreaded-and-wanted
[3] https://www.theregister.co.uk/2018/03/14/developers_dread_visual_basic_6_ibm_db2_sharepoint_survey/
[4] https://intellij-rust.github.io/
[5] https://regmedia.co.uk/2020/04/20/rust-concepts.png
[6] https://redmonk.com/sogrady/2020/02/28/language-rankings-1-20/
[7] https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master/docs/project/policy/programming_languages.md#Rust
[8] https://go.theregister.co.uk/tl/1936/-8554/forrester-build-a-digital-experience-portfolio?td=wptl1936
Re: despite the enthusiasm of developers [snip] adoption remains limited
The compelling reason for Rust, is that eliminates bugs that plague software written in C or C++ such as null pointer exceptions, double frees, buffer overflows, data races. These can crash software or compromise its security - look at the Common Vulnerabilities & Exposures (CVE) database for examples.
As it's a compiled language it also has similar performance to C or C++. Whether that matters to you largely depends on what you are writing. If your game crashes it's merely a nuisance. If a critical component of your server crashes then it could mean much more.
@DrXym Re: despite the enthusiasm of developers [snip] adoption remains limited
If you ever have to interview a developer, ask them to talk about their favorite programming language.
Ask them to name one thing that they absolutely love and one thing that they absolutely hate.
There is no right/wrong answer, but it will give you valuable insight into the candidate. ;-)
That said... C and then C++ really require those who develop to be very skilled at their art.
You will see a lot of the NPE, Memory Leaks drop off when the developer takes the time to craft their code properly.
The problem of course is that this is the minority of trained developers and very few want to pay for this level of expertise not to mention the amount of work outstrips those capable of doing the work properly.
That's why you see a dumb-ing down of the languages.
I'd look at Rust or other languages, however I've been pushed up the corporate ladder to a point where I'm not allowed to code anymore.
Mines the jacket with the key to the executive washroom that isn't an illicit copy, it its pocket. . ;-)
Re: despite the enthusiasm of developers [snip] adoption remains limited
Our server code is written in C++ and I can't remember the last time we had a crash or a memory leak. I'm not saying we're perfect but C++ has come on leaps and bounds since C++03. Rust protects you from this unless you go 'unsafe', and the devs that can still make modern C++ crash and leak will probably get to do the same in Rust.
That said, what will get Rust more widely used is the 3rd party libraries / source code. With C++ it's a pain and that random HTTP parser you cloned from github may not be the best quality.
Also, networking. C++'s ASIO stuff is a headache, I'd be surprised if Rust is in a similar boat. I'm considering dropping ASIO altogether and going straight to using io_uring.
Re: despite the enthusiasm of developers [snip] adoption remains limited
"C++ such as null pointer exceptions, double frees, buffer overflows"
Code written in modern C++ (2011 onwards) doesn't have to suffer from any of that as all the containers you need to avoid manual memory allocation and raw pointers are there for you. And the bonus is that if you DO need raw pointers - for example when accessing H/W direct or doing other low level twiddling - then you still have them too.
As for data races - threading and multi process IPC is a black art which many people think they've grokked but often haven't and so leave nasty little once in a blue moon gotchas in their code. I doubt thats any different in Rust for any significant complexity of code as there's only so much the language and OS can do for you.
I wonder if one of the reasons why people find Rust so difficult is that it forces us to think about things that many programmers gloss over, which is why traditional programs are so bug ridden these days.
Programming really well is HARD and I suggest that some people are just not capable of doing it. Rust just makes you think about some of the things that we are no accustomed to thinking about so completely and comprehensively. What should this code do if a memory allocation fails? Just what is the full lifecycle of this object?
I have looked into Rust from the perspective of a C/C++ programmer and I happen to think it is a breath of fresh air. Just a shame I cannot convince where I work to give it a try. I think we here are in the same boat as many C++ shops in that we have a lot of investment in the older languages and the risk of moving into something fairly new in product areas that are already highly developed is difficult to justify.
If a developer needs an IDE to be productive
Then frankly he's a poor developer who obviously needs electronic nannying to understand the code he's working on. I develop C++ on *nix and I'm quite happy using the command line toolchain - vim, make, gcc, gdb, strace etc.
"vim, make, gcc, gdb, strace etc"
I mean, you are using an IDE, it's just rather loosely integrated.
C.
Re: If a developer needs an IDE to be productive
Same boat as you but I used QTCreator just for code writing. They do actually help productivity.
But yes, gdb, make etc are still from the terminal.
despite the enthusiasm of developers [snip] adoption remains limited
I'd like to see more on this...
Otherwise it's starting to remind me of ADA [and why ADA was not widely accepted as a 'language of choice' for new development]
So I'm sticking with C, C++, PHP, and occasional Java and Python [and Javascript ONLY when other choices make very little sense] until there's some really compelling reason to pick a language like Rust.
(nice article though - provokes thought)