These are chat archives for rust-lang/rust

25th
May 2016
mlk5060
@mlk5060
May 25 2016 11:01
Hi all, just wondering if anybody has tackled the "anagram" Exercism exercise for Rust and what their thoughts are on it? I'm currently working through it and finding it a bit of a challenge. When I say "a bit" I'm underestimating, I think
Zakarum
@omni-viral
May 25 2016 11:19
So what is a problem?
mlk5060
@mlk5060
May 25 2016 11:27
Basically the huge amount of new concepts that need to be dealt with in order to get a working program for that one exercise! Concepts include handling various features of String/&str, lifetimes, loops, borrowing... Considering the first two exercises took less than 45 mins for me to complete, this one has so far taken around 2-3 hours. The steepness of the learning progress and slowing of progress may disuade a lot of people from continuing to learn because they become discouraged by lack of progress relative to previous progress.
The concepts themselves are also difficult to learn. I've been programming for a while now (Java and web dev.) so explicitly handling "lifetimes" was a little challenging. The method signature for the main method called by the Exercism tests took me around 40 minutes to write correctly!
Zakarum
@omni-viral
May 25 2016 11:59
@mlk5060 concept of lifetime is easier to understand for people who get used to non-GC languages.
For instance, C++ programmers already have such concept, but lack an ability to express it in language
mlk5060
@mlk5060
May 25 2016 11:59
I've picked it up fairly quickly but the leap in difficulty from Exercism's second Rust exercise to its third seems a little too steep
Zakarum
@omni-viral
May 25 2016 12:00
Could you provide a link to it?
Or even better to play.rust-lang.org with your code
mlk5060
@mlk5060
May 25 2016 12:27
Exercism provides you with test code and you have to write code to make the tests pass. The exercise outline and test code can be found here: http://exercism.io/exercises/rust/anagram/readme
Bear in mind: I don't want an answer to the exercise! I'd rather struggle though it myself since I'll learn more that way
Zakarum
@omni-viral
May 25 2016 13:12
This message was deleted
Well. I had a little trouble with &&. Not sure why &'a &'b can't be transformed to &'b when 'a not larger than 'b