
Rust in 2017: what we achieved - steveklabnik
https://blog.rust-lang.org/2017/12/21/rust-in-2017.html
======
m12k
I've never written a single line of Rust. But I try to keep up on it since
it's one of the most interesting and ambitious languages to come along in a
long time. And I will say this, I think the community is doing a great job of
being transparent and making it possible to follow along on the side. If it's
anywhere near as well-run on the inside as it seems to from the outside, then
I think it will serve as a poster child of how to develop a language in the
open and build up a community around it.

------
pohl
The first thing I did when my holiday break started was to configure Visual
Studio Code with RLS and work through the examples in the O'Reilly Programming
Rust book. There are some rough edges, but it's amazing how far the tooling
has come.

~~~
cevn
Can you use a debugger yet? This was a major roadblock for me when I tried to
learn rust. (other than lldb)

~~~
mikebenfield
LLDB works well enough to sometimes be useful. I've used it with the VS Code
native debugger extension [1].

I've encountered a couple annoyances:

A. Using rustc to link somehow removes debugging information from static
libraries I wrote in assembly [2]. This is extremely annoying, but I haven't
had time to really look into it and it seems others can't reproduce it.

B. There seem to be some occasional oddball problems when stepping through
code. Like it'll skip lines, or stay on the same line for many steps. And also
an annoyance regarding how that VS Code extension handles "Step Into" for
functions you don't have the source for: you can easily get into an infinite
popup situation and have to restart the debugger.

IMO the sad truth is that if a great debugger is a prerequisite to use a
language, then you're limited to about 5 total languages.

[1]
[https://marketplace.visualstudio.com/items?itemName=webfreak...](https://marketplace.visualstudio.com/items?itemName=webfreak.debug)

[2] [https://github.com/rust-lang/rust/issues/45218](https://github.com/rust-
lang/rust/issues/45218)

~~~
bluejekyll
> Like it'll skip lines, or stay on the same line for many steps.

I've never hit these problems, though I have the source for everything I'm
compiling in Rust in general.

~~~
syn_rst
I've run into it before, but it's not usually too serious. It only usually
happens on lines with compound expressions or chained calls like this:

    
    
      foo.into_iter().map(|x| x+1)
         .filter(|y| y > 2)
    

My working theory is that it's related to situations where there's multiple
statements on the same source line (or inside a block inside a lambda).

~~~
bluejekyll
Yeah, quite possibly. I feel like I've stepped through some pretty gnarly
iterator chains and it's worked surprisingly well. It is rare that I actually
need to turn to the debugger, so I could be mistaken.

------
rhencke
This is the kind of post that's a joy to read, especially during the holiday
season.

Congratulations on a great 2017, Rust.

------
chewbacha
I have recently gotten back into coding with Rust and I must say that the
strides in the compiler errors and usability have been massive. Getting things
to work has never been easier and every time I get something wrong I learn a
little bit more.

Kudos Rust team.

------
reacharavindh
Not done my homework with Rust yet. Pardon my ignorance.

Does Rust have a native(all Rust) implementation of SSH client yet?

(I know ssh2-rs exists, but, I'm looking for a Rust implementation and not a
wrapper over libssh2(C))

Does Rust have a stable/documented library for serving Web applications over
http/2 yet?

(I have heard about h2, hyper and Rocket, but can I write a basic web app in
Rocket and expect it to use http/2?)

I like everything I hear about Rust. I will allocate serious learning time to
it when the answers to the above questions turn to yes. Hopefully soon!!!

~~~
steveklabnik
I believe [https://crates.io/crates/thrussh](https://crates.io/crates/thrussh)
is the answer for #1.

#2 is coming, but not quite yet.

------
appleiigs
Best part of Rust in 2017 for me is all the new books: 2nd edition of The
Book, Programming Rust, Learning Rust, Mastering Rust

------
maxpert
You read this and then you read post from Crystal Lang. You can see a
significant difference in choices made and why Crystal 1.0 was delayed.

------
techwizrd
I've had a great time writing Rust this past year, and I'm looking forward to
the next year. Thanks, Rust team!

------
SilverSlash
Is it possible these guys fail to realize people don't use python for its
speed? I, for instance, use python because it's an extremely elegant language
that allows me to write short, compact, and succinct code that's incredibly
easy to read and is self documenting.

~~~
friendzis
I do use python, but calling any dynamically typed language self documenting
is a huge overstretch. Sure, naming may be structured well, revealing _intent_
, but without formal contracts the code is not self documenting. There is this
problem with computers that they perform what they are told to, not what is
expected from them. Good naming and structure help closing the gap between
expected and actual behavior, but the gap is always there, therefore this is
documentation in at most a very broad meaning having very little to do with
language in question.

Static types, on the other hand, actually document things - at the very least
what can be passed and what will be returned. This may not be completely
necessary when reading code or even writing code in a well known environment
and context that fits into programmer's head, but without formal contract
programmer is faced with two choices: _trust_ manual or read and understand
ALL the code. Python is notorious offender here with args and kwargs - when
reading code using some wrapper library I must understand how underlying
library is used, because customization of underlying library behavior is not
part of wrapper library documentation.

~~~
b0rsuk
I agree. I'm learning Rust by rewriting someone else's small Python app in it.
Rust requires you to define your variable types, especially for container
types like vectors. I'm a decent Python programmer, and the app code is
straightforward, but I realized I don't know what data the app operates _on_
at each stage! I was forced to randomly insert print() around.

Maybe it's time to finally learn gdb...

