Live data from Hacker News

Rust 1.26 released

blog.rust-lang.org

41–50 of 178 posts

Re: Rust 1.26 released

#41

So, so, so much stuff in this release! The next few are shaping up to be similar. Very exciting times! As always, happy to answer questions, provide context, etc.

This more than makes up for a couple of slightly sparse releases. Congratulations to the whole team, and to you especially for the completion of the new book:

Re: Rust 1.26 released

#42
I'm super excited about the "Basic slice patterns". I've been learning some Elixir at the same time and was blown away by the different style of programming you can write in using matching. Glad to be able to try it out in Rust as well.

Re: Rust 1.26 released

#43
post #20

Earlier quoted context omitted.

The mismatch isn’t about the associated type, it’s about the actual, underlying type. One is a Map and one is a Filter. It’s not possible to determine which is returned, so you inherently need dynamic dispatch. There is some discussion about it possibly being sugar for an anonymous enum in the future, but that’s not what it is right now.

Is there an RFC for the anonymous enum thing? I would gladly write the implementation ... :D

there's some discussion, but no RFC yet. https://github.com/rust-lang/rfcs/issues/2414

Re: Rust 1.26 released

#44
post #20

Earlier quoted context omitted.

The mismatch isn’t about the associated type, it’s about the actual, underlying type. One is a Map and one is a Filter. It’s not possible to determine which is returned, so you inherently need dynamic dispatch. There is some discussion about it possibly being sugar for an anonymous enum in the future, but that’s not what it is right now.

Is there an RFC for the anonymous enum thing? I would gladly write the implementation ... :D

[deleted]

Re: Rust 1.26 released

#45
The wonderful thing about Rust is that despite being fairly new and rare to get paid for working on it, it is still enticing( to most programmers I've met). The consistent effort to improve it is really paying off. I hope it gets to a place where it's `batteries included` like Python. There are some glaring holes in the stdlib I would like to see fixed sometime soon.

Re: Rust 1.26 released

#46

Everyone keeps talking about impl Trait (which is great) but I'm super pumped for ? working in main now. Was recently writing some code as I finally got back to rust and forgot about that edge and had to write a match block when ? would have been good enough (felt silly to make a method just to handle that).

Agreed, being able to get rid of spurious unwraps in trivial code and small code examples and replace them with idiomatic error handling is lovely. :)

Re: Rust 1.26 released

#47
post #45

The wonderful thing about Rust is that despite being fairly new and rare to get paid for working on it, it is still enticing( to most programmers I've met). The consistent effort to improve it is really paying off. I hope it gets to a place where it's `batteries included` like Python. There are some glaring holes in the stdlib I would like to see fixed sometime soon.

Which glaring holes are there in your point of view? Rust devs are on HN a lot, so maybe they will see your comment.

All that said, Rust definitely errs on the side of preferring to put things in 3rd party crates instead of stdlib, even for things that are very common to put in std for other languages (e.g. random number generation).

Re: Rust 1.26 released

#48
post #45

The wonderful thing about Rust is that despite being fairly new and rare to get paid for working on it, it is still enticing( to most programmers I've met). The consistent effort to improve it is really paying off. I hope it gets to a place where it's `batteries included` like Python. There are some glaring holes in the stdlib I would like to see fixed sometime soon.

Which glaring holes are there in your point of view? Rust devs are on HN a lot, so maybe they will see your comment. All that said, Rust definitely errs on the side of preferring to put things in 3rd party crates instead of stdlib, even for things that are very common to put in std for other languages (e.g. random number generation).

A couple of commong APIs I can think off the top of my head:

- HTTP client

- CSV parser/generator

I know Hyper and rust-csv are popular. But having an stdlib that's much more feature complete would be great.

Re: Rust 1.26 released

#49
Is it possible to match the end of a slice with slice patterns? Something like:

    fn foo(s: &[char]) {
        match s {
            ['a', 'b'] => (),
            [.. 'b', 'c'] => (),
            _ => (),
        }
    }

Re: Rust 1.26 released

#50
post #45

The wonderful thing about Rust is that despite being fairly new and rare to get paid for working on it, it is still enticing( to most programmers I've met). The consistent effort to improve it is really paying off. I hope it gets to a place where it's `batteries included` like Python. There are some glaring holes in the stdlib I would like to see fixed sometime soon.

The argument for putting things in third-party "blessed" crates rather than the standard library is that it allows them not to have to follow the versioning guarantees of Rust itself. Given that the core team has stated that they don't plan to have a Rust 2.0, this means that there wouldn't _ever_ be any API-breaking changes for things added to the standard library; by having things like `regex` and `rand` be external crates, versions bumps can happen independently happen, which means (among other things) that major version bumps are possible.
Post reply on HN