Is this a good place to request comments on a (really horrible) first
Rust program?

https://github.com/tmmcguire/rust-toys/blob/master/mk_anadict.rs

For inspiration (and because I have no actual creativity of my own), I
picked up
http://www.jeffknupp.com/blog/2013/01/04/creating-and-optimizing-a-letterpress-cheating-program-in-python/,
which is basically an anagram solution generator; this first program
generates a text dictionary of letter sequences to words, one mapping
per line.

I'm using Rust 0.5.

* I used std::map::HashMap, although I have since read that LinerMap is
more idiomatic?

* I saw a suggestion to use @~str since ~str's seem to be better
supported, library-wise, and I saw a suggestion to use @~str to avoid
the copying warnings for bare ~str's.

* After playing some more, I think read_lines is kind of silly.

* For no readily apparent reason, I used @[] quite a bit. Should there
be any special preferences for ~[]?

Thanks in advance for any comments on correctness, style, idiom.


-- 
Tommy M. McGuire
[email protected]
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to