Re:Announcing Rust 1.36.0
by AlleyTrotter on Thursday July 04, 2019 @05:14PM
(#20357862)
Can someone point to a explanation of how to speak/read Rust.
exactly how would you say "use std::fs::File"
How does one pronounce ::
Seems simple enough but things get much more complex by the third or fourth chapter of the Book.
[ Parent
| on HN ]
I would just read the words, "use" "standard" "fs" "file" and wouldn't pronounce the "::" at all.
Re:Announcing Rust 1.36.0
by AlleyTrotter on Thursday July 04, 2019 @05:28PM
(#20357960)
so the " :: ' has no verbal meaning, it's just a way of linking traits, libraries, functions,or crates?
Not easy to explain
Re:Announcing Rust 1.36.0
by atombender on Thursday July 04, 2019 @10:16PM
(#20359389)
It's for dereferencing namespaces. "a::b::c" is analogous to a file system path /a/b/c.
Re:Announcing Rust 1.36.0
by AlleyTrotter on Thursday July 04, 2019 @05:33PM
(#20357990)
I found what I was looking for in the appendix
B-3 Path related syntax """ ::path Path relative to the crate root (i.e., an explicitly absolute """
std pronounced "stud" with a very very short "u".
I never pronounce separators like ::, ., ->... And braces, brackets, parenthesis and angle braces I do not pronounce. Programming languages are made not to sing them, but to write and read. To read silently I mean. While I understand what I'm reading, I do not bother to pronounce it in a way that would be digestible by an accident listener.
If such a strategy stands between you and understanding, I'd suggest you to use silence gaps of different lengths. Like 0.5s for space and 0.2s for ::.
Re:Announcing Rust 1.36.0
by AlleyTrotter on Thursday July 04, 2019 @05:41PM
(#20358042)
you don't pronounce "->" as returns even in your thoughts?
I used above -> in a C++ sense, but I tried it watching myself with Rust, and seems that I do not pronounce ->. I pronounce just identifiers, keeping track of the context (and therefore the semantics of identifiers) by other means.