
Rust 2018 survey results - steveklabnik
https://blog.rust-lang.org/2018/11/27/Rust-survey-2018.html
======
mrec
The "Do you consider yourself a member of an underrepresented demographic in
technology" result is interesting - 92.06% No, but a total summing to 156.3%.
Assuming this question was phrased as "either No, or check all that apply",
this suggests that _many_ of those who do feel underrepresented feel that way
on multiple counts.

Is the _" The survey also highlights some challenges, as the number of women
is still lower than the industry average of women in programming fields"_
editorial comment based solely on this result? It seems to exclude the
possibility of women who don't identify as belonging to an underrepresented
group.

~~~
ancarda
>It seems to exclude the possibility of women who don't identify as belonging
to an underrepresented group.

Absolutely. If I had taken this survey, I wouldn't have checked "I feel
underrepresented because I'm gay" because... well, it's literally never been
an issue. In that sense, why would I care if I'm the only gay guy in a team of
a million programmers? They all treat me just fine. Must I be "represented"?

I can imagine the numbers, for that reason, simply won't reflect the number of
non-heterosexual people. It could be higher.

~~~
swfsql
Yes, they used "_do you consider yourself_ underrepresented". And there's also
the implicit "and _do you feel like this matters_ for this survey". Some
people may feel underrepresented but don't feel like this should matter on
this survey, so they'd be likely to answer "No".

So a decrease in the "underrepresented" statistics doesn't necessarily mean
it's dealing with the actual situation.. It wouldn't necessarily imply
anything "bad" or "undesired".

~~~
Retra
And this is why every survey I've ever taken has pissed me off and now I don't
take them at all. I've _never_ felt that the information gleaned from a survey
was honestly useful for making decisions.

~~~
smolder
This is typical of political surveys and other surveys where there is a
"preferrable" outcome, but I don't think in this case they are trying to get a
specific outcome. Maybe feedback can make subsequent surveys better and reduce
the ambiguity of results.

~~~
Retra
It's typical of all surveys. You either need to go into extensive detail to
remove the ambiguity of the questions, or you need to allow people to state
what they think in plain language. Taking surveys to gather information is
like using record sales to measure what kind of music is best; there are a
billion confounding factors and none of them are covered by the abjectly
simple metric used.

------
arialeks
Can someone explain to me what a good use-case for Rust would be? I mean, why
would I pick it over C#/Go/Python for web development? Does it only outperform
them, or is it also a pleasant language to use?

~~~
sanxiyn
I would not pick Rust over C#/Go/Python for web development.

~~~
qaq
Go? Here's Rust enum for working with JSON

enum Value { Null, Bool(bool), Number(Number), String(String),
Array(Vec<Value>), Object(Map<String, Value>), }

How would this look in Go?

~~~
Matthias247
throwing annotations on structs and letting the library generate suitable
serializers and deserializers works reasonably well in Go, as long as the JSON
is not too unstructured. The same applies for Java and C# (here the JSON libs
might be even better). And obviously for Rust too via serde.

~~~
qaq
Thats a fairly big restriction though and a sign of type system that is not
flexible enough.

~~~
Matthias247
Maybe. However your representation isn't without drawbacks either: All fields
are typed by strings, and are thereby not strongly typed. And each additional
level (in an array or object) requires mandatory boxing and allocations. The
codegen variants on pure structs don't have this drawbacks.

I would say your representation is favorable when someone wants to work with
arbitrary JSON in a flexible fashion. However if schemas and code generators
are available, I would prefer to use those.

~~~
qaq
Thing is in Rust you can do both

------
GhostVII
It's interesting how 7.71% of respondents said they felt they were
underrepresented due to being non-heterosexual. If 7.71% of Rust users are
non-heterosexual wouldn't that be roughly in line with the expected number,
since less than 10% of people fall into this category? It is also possible
that this study is not a representative sample of Rust users, but then that
also makes the rest of the results less useful as well.

~~~
tjoff
Should they have had a perfect idea of how many others were non-heterosexual?

~~~
GhostVII
Well that's my point, they seem to have a perception of the Rust community
that is incorrect. It's not neccesarily a bad thing, just an observation.

~~~
tjoff
Ah, doesn't sound surprising to me. If the topic isn't regularly discussed I'd
assume that most minorities would feel underrepresented. Also not necessarily
a bad thing.

------
msvan
Rust is such a great language, and I wish I had more excuses to use it
frequently. It is well-designed and pleasant to use. It has a vibrant and
friendly community. It is fast. The library ecosystem is getting there. Go
Rust!

------
dman
How/why are so many people using nightly as their rust version? Usually
companies are conservative about jumping onto newer compiler versions.

~~~
jcelerier
I've seen some people gladly using nightly rust but restricting themselves
with the GCC and CMake that comes with CentOS 6. The damage done by
distributions shipping development toolsets is never-ending.

~~~
jjnoakes
The biggest reason (for me anyway) to restrict which gcc I use (and stick to
the system-provided one) is so I don't need to distribute libstdc++ and
libgcc_s with my program.

The RedHat devtoolset was a nice solution to this (use a newer gcc version,
but link to the system libraries), but if that isn't available, then building
with the system compilers helps in this area.

Rust doesn't have this problem when rust programs are statically linked, but
if distros start shipping rust shared libraries which other programs start
depending on, and/or some of the rust standard lib ends up in a system shared
library, some of the same issues may arise (or maybe not, rust may have solved
them in a clever way).

~~~
steveklabnik
It's not the end of the world for distros; they pick a single Rust version,
and so shared libraries work for them.

They _do_ need to recompile the world when they update the compiler, but it's
a single recompile each time.

~~~
jjnoakes
Right - and so you get same situation that you have in C++-land (if I'm
understanding you correctly) where compiling arbitrary rust programs with the
distro compiler level may benefit you if you want to depend on the system-
provided rust shared libraries.

~~~
steveklabnik
Yep.

------
ksec
The most surprising thing was "Rust should do more marketing, not many people
know about it".

I would have thought literally every programmer on earth would have heard of
rust. Whether they have looked into it or use it would be a different
question. But unless those programmers don't keep up with their tools, I find
it hard to believe they don't know about Rust.

~~~
di4na
Most of the programmers out there do not have any community contact outside of
the company they are part of.

We are not representing the majority here

~~~
ksec
I assume they would have read news, Reddit, or Digg ( in the old days )
Internet forum, HN etc.

If they have not heard of Nim, Crystal, D, then I would not be surprised. But
Rust?

~~~
steveklabnik
A lot of people do not read reddit, digg, hacker news, or internet forums. Way
way more than those that do.

~~~
ksec
I don't mean normal everyday consumers. But I would be surprise if programmer
don't go on internet often for information. Not information on latest news,
but documentation, problem solution, etc. Stackexchange, Google. Even good old
manuals of long lost chips, reference in assembly languages. The chances of
these people never heard or bump into the word "Rust"?

That is like saying programmers have never heard of Swift.

They may not know anything about it. But not "heard" of it, is.... strange?

~~~
di4na
And still it is the truth. More than you think.

Hell i work for a car manufacturer with thousands of devs. Most of them have
not heard from anything since early 00s Perl, PHP and Java. And they have not
moved. Everything newer is "Startup stuff, we live in the real world here"

~~~
steveklabnik
Yeeeep.

~~~
di4na
I see you have dealt with some of them recently :D

I mean to be honest, it is a great thing for me. As my specialty is to cleanup
and replace that kind of systems, ala 18f/USDS. I have an easy job finding for
my whole life.

But hell it makes it hard to talk with the "vocal" people out there.

------
ChrisSD
Nitpick: Some of those pie charts are not very nice to read. Some of the busy
ones have me scanning for labels left and right. A table would be simpler to
read (especially as the labels are small and light grey for some reason).

I think pie charts are perhaps better when you've got, say two to four items
and labels are short enough to be in place instead of off to the side.

~~~
steveklabnik
Thanks! And to jononor's comment below as well.

We're not exactly data scientists... maybe for next year we'll make some of
these changes.

~~~
ChrisSD
No worries. It's a great survey regardless, so thank you!

------
jononor
All the pie charts except for the very first would be better presented as bar-
charts, I think.

~~~
wongarsu
That's true of 95% of all pie charts in existence. Yet pie charts still seem
to be the default choice for graphs. I honestly don't understand it.

------
forrestthewoods
I’m surprised to see library support so high on the “needs to improve” list.

It makes sense when compared to the rich Python ecosystem. Coming from a C++
background I consider the Rust library ecosystem to be one of its strong
points already!

~~~
pritambaral
> Coming from a C++ background I consider the Rust library ecosystem to be one
> of its strong points already!

In a sense, I agree with you. Certain kinds of features available in the Rust
ecosystem are much more easily available than in the C++ world, and there's
been a lively pace of articles published about libraries and applications in
Rust. But another sense I got from looking at libraries to use myself and
applications to learn from was that the ecosystem is quite smaller and ... not
quite as matured as the C/C++ ecosystem (I'm _completely_ ignoring FFI for
this argument). Of course, all of this is completely natural, and I'm simply
not expecting them Rust ecosystem to be competitive with the much older C/C++
ecosystem(s), but this realization does temper my excitement with Rust a bit.

~~~
forrestthewoods
Some of my excitement is for potential rather than current offerings.

But having a gamedev background we tend to roll most things ourselves. C++ is
such a hodgepodge of mixed build systems that adding a moderately sized
library is a huge PITA.

------
BuckRogers
I don't program in Rust regularly, but it's on my short list of languages that
I keep up on and am a member of the local user group (Meetups, to use the
commercial implementation). I have a trio that I keep up on, C# (gen purpose,
my language of choice), Rust (systems) and Elixir (web).

I only really use C#. I've kicked the tires on Rust and Elixir, and I could
see myself using Elixir on a personal project but unlikely I'll ever have a
good usecase for Rust.

It does power a large portion of my Firefox browser, so from that sort of
usage viewpoint I'm using something built with Rust everyday, which I can't
say likely will never say for Elixir, discounting the other language on the
BEAM platform.

------
whatshisface
I wonder what the correlation is between "took a long time to become
productive in Rust" and "uses Rust rarely."

~~~
sam0x17
Coming from Crystal/Ruby, I just could never get it to do what I wanted it to
do. Tried writing a generic stream API, and using closures naturally like
anyone would to do things like "on_data" etc., only to run into insurmountable
life cycle and borrowing problems. Tried for 4 weeks straight to get the same
100 lines of code to work. Ended up giving up when the rust gitter told me it
was impossible to do this sort of thing, and wrote a perfectly working
implementation in crystal in an afternoon.

~~~
p0nce
Perhaps a GC would help Rust being this productive?

~~~
Jach
Rust had an optional GC once, they removed it. Nim is the answer to scrubs
like me who thought Rust was interesting up until that point, since Nim is
super fast and lets you allocate/deallocate directly (use of GC is optional)
and has three different GC implementations to choose from (including a soft
real time one).

~~~
rcxdude
despite the name for the syntax, rust never really had a GC, just a slightly
shorter syntax for reference-counted heap-allocated objects and a vague idea
of 'probably it'll handle loops one day', until the language design solidified
around an extremely minimal runtime and preferring standard library features
over language features.

------
dom96
In case you guys want a comparison to a similar survey for another language,
here is Nim's 2018 survey results: [https://nim-
lang.org/blog/2018/10/27/community-survey-result...](https://nim-
lang.org/blog/2018/10/27/community-survey-results-2018.html)

------
schmichael
I really wish languages would standardize on at least some of these questions
to make comparisons possible.

------
manigandham
Side note: Pie charts are terrible for conveying any real information. Stick
with bar charts for ratios.

------
openredbull
Are these results published in multiple languages, as the survey was conducted
in multiple languages?

~~~
steveklabnik
Not currently, as we only blog in English.

We’re still, as a project, working on i18n. Conducting the survey was one of
the big first steps. We’ll get there.

------
Narishma
The low contrast of the text in the graphs makes them near illegible to me.

------
hartror
Pie charts :(

