6 ms·
I'm continually delighted to see so many programmers with backgrounds in dynamic languages feeling at home in Rust, given that that's my trajectory as well. :)
by kibwen 11y ago
I'm continually delighted to see so many programmers with backgrounds in dynamic languages feeling at home in Rust, given that that's my trajectory as well. :) I'm giving a three-hour Rust tutorial at OSCON this year and I'm honestly torn over whether I should tailor it towards people coming from dynamic langs or people coming from C/C++. I feel like I might end up just having to write two tutorials and take a survey as people come in to determine which to focus on.
- danieldk 11y agoI'm continually delighted to see so many programmers with backgrounds in dynamic languages feeling at home in Rust, It would be nice to get some statistics, because it would be quite unexpected. Still, it seems like some major Rust contributors are coming from the dynamic programming fold. Also, we shouldn't compare Go and Rust, but Go seems to have influx primarily from dynamic languages as well. (I come from a C/C++/Java/Prolog/some Haskell background, dabbling with Rust now.)
- nickpsecurity 11y agoOr you can do one with examples from both worlds for key areas of the language. It would seem that 80+% of each tutorial would be the same anyway. A slight detour into one side shouldn't irritate other part of audience so long as each example isn't too long and you explain it so they can mentally follow the discussion.
- viperscape 11y agoI vote for dynamic. I left C many a year ago for dynamic languages, mostly to avoid C++. Now I'm back with Rust for a while now, thoroughly enjoying it.
- lambda 11y agoI don't necessarily think that it's an either/or situation. I started out with dynamic languages, then did a mix of dynamic languages and C++ for a while (C++ engine with Scheme based scripting language), then went back to dynamic languages, and am now getting into Rust. You are likely to have a mixed audience as well; even if not everyone has that mixed experience like I do, there will probably be a mix of people in the audience. So, it would probably be a good idea to have some examples and descriptions tailored towards those with a C++ background, and some towards those with dynamic language backgrounds.
- dikaiosune 11y agoNot sure whether this is relevant for your talk, but I rarely see these introductory talks address a language that a lot of people write and which intended to provide several of the same guarantees that Rust does: Java. Java has statically typed "safety" (which is something most Rust talks pitch to dynamic lang devs), decent performance approaching C/C++ for long-running tasks, etc. I think Rust does way better at most of Java's strong and weak points (aside from maybe ecosystem and current deployments), but it would be good at some point for Rust to have a good story to present to Java devs. Its type system is much better, its safety guarantees stronger, it has pretty good cache locality, its concurrency is approaching the ease of use of the JVM's and has always been safer, and its use of memory is far more reasonable and isn't prone to GC pause.
- autoreleasepool 11y agoAs a Rust-curious C++ user, I've actually been frustrated about the lack of C++ to Rust material. It seems easier to find a "Rust for Rubyists" or "Rust from Golang" articles than a "Modern C++ to Rust" guide. In fact the two languages are almost exclusively discussed in a competitive context. This results in a lot of information that isn't really useful to those not emotionally invested in Rust's success. It's as if folks coming from C++ are supposed to "just get it". It's supposed to be "obvious" why Rust is a better choice than C++, yet I don't see it. Maybe if I was writing some sort of mission-critical software I would look into Rust. But I use C++ for cross-platform mobile applications. I've had trouble finding a compelling reason to invest my precious free time time in learning Rust over furthering my C++14 knowledge.
- pcwalton 11y agoThe main things that Rust offers over C++ are memory safety and better concurrency via data race freedom. There are other nice things too, like better macros, strongly typed generics, and pattern matching, but those two are the main highlights. That being said, some projects are legitimately OK with some memory management errors and/or races creeping into production, in exchange for a lower learning curve in that area. If this describes your project, and you're happy with C++, then keep using C++. (Note that I don't believe that "I write modern C++ so I never make memory management errors" is virtually ever true. Every large C++ app I've ever seen has fallen to some memory error or another. I think "I don't care (enough) about the errors" is a legitimate reason to use C++, but "I don't have to care" isn't.)
- autoreleasepool 11y ago> Every large C++ app I've ever seen has fallen to some memory error or another. I think "I don't care about the errors" is a legitimate reason to use C++, but "I don't have to care" isn't. I very much agree. Although few people would say "I don't care about the errors", out loud, even if that sentiment is valid in certain contexts. In that light, I have a question for you: What other concurrency features does Rust offer over C++ outside of data race freedom guarantees?
- StevePerkins 11y agoThe creators of Go assumed that their primary audience would be disgruntled C++ devs, and were surprised to find instead that it's mostly Ruby and Node.js people. Despite all of the "systems language" talk, it would not shock me in the least to see the same thing happen with Rust (or whatever new language comes along next year). I don't intend for this to be a slight, but the plain fact of the matter is that "dynamic" languages come in and out of fashion every 5 years or so. Those people are accustomed to that cycle. They get bored easily and PREFER that cycle. The senior ones are usually on their second or third language cycle (or beyond). In contrast, C++ and Java are ENTRENCHED in their areas (systems programming and business applications, respectively). Whatever ultimately displaces them someday... it will have to be an order of magnitude better, and it would still take years. By all means, market your favorite new language(s) to all possible demographics. Just understand that the "PHP/Python/Ruby/Node/Go/Elixir/Swift" crowd are going to be your primary adopters (and conversely, the first to grow bored and leave when the next thing comes along).
- monkmartinez 11y agoDo you think the "bored" and "move on" story could be driven by more than just a "shiny" new language perhaps? Economics maybe? Perhaps some developers in the "PHP/Python/Ruby/Node/Go/Elixir/Swift" crowd are trying to gain credibility in the OSS/Github world by making a not-yet-developed but vital library in the new language. If github is your resume, this could be a large win for their portfolio/resume. Another take... For Python, there are dozens of projects that do the same manipulations, but are implemented slightly differently. People can, of course, contribute(patches, issues, etc.) to libraries they use the most... or they can make the 25th iteration. A new language presents a way to tickle the brain in a not-so-tedious manner by eliminating the technical debt in the other language's implementation while providing new paradigms to code around. I call that tickling the brain and it can be addicting.
- StevePerkins 11y agoThis is only supposition, but I believe that the vast majority of idle programming discussion on the Internet is non-professional. If you go to a site like StackOverflow, that is related to getting actual work done... the questions for Java, .NET, C++, and PHP absolutely dwarf those for Ruby, Python, and other fashionable dynamic languages (JavaScript being a notable exception). If you look at the number of GitHub repos by language, you find a similar pattern. However, you go to sites like Hacker News and others that are more about idle discussion, and it's hard to find people who will even admit to working with non-sexy industry standard languages. If you didn't know better, you would get the impression that there are more Nim and Forth programmers in the world than PHP ones. I believe that is because most such discussion comes either from students, who haven't started a career yet, or from professionals who enjoy discussing the "side" languages that they learn in their personal time (yet are not using professionally). I don't mean this in a negative way. I myself wrote OBSESSIVELY about Scala for years, even though my actual day jobs had me writing vanilla Java. But online discussion does create a bit of a "reality distortion field", that confuses young people just starting out. The #haskell channel on FreeNode is the most popular programming channel in all of IRC... yet the entire world's population of non-academic professional Haskell developers could hold a conference at the airport Holiday Inn. Rust is a fascinating language to learn and dabble with, but almost none of us will ever have a job working with it professionally. Etc. People get "bored" and "move on" from these languages not due to economics, but due to lack of economics. They are playing with them for fun, not because they're getting paid to do professional work with them. Hence the constant search for newer shiny things.
- losvedir 11y agoI'm in the same boat (web developer learning rust for fun), but I do fear a bit about losing the "soul" of rust if it caters too much to us. I still see rust first and foremost as a C++ replacement, for things like making my web browser more secure. I don't personally program in C++ but it's my hope that those who do will consider rust. I've lately sort of been looking askance at how prevalent we dynamic language users are in the rust community, and I worry that we may skew the perception of how rust should evolve due to our potentially greater numbers on /r/rust, in the RFC process, on IRC, etc.