Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Such a Little Thing: The Semicolon in Rust. Parent comment
A tight summary of all of it would be as long as the article. However, the point about semicolons in Rust is:
1. ; is a separator, not a terminator.
2. a;b separates a and b.
3. a; is a special case which means a;nil(or whatever is the equivalent in Rust)
4. The last expression in a function will be the return value of the function.
5. If the last line in a function is "a", it returns a. If it's "a;", it returns nil(from 3)
A tight summary of all of it would be as long as the article. However, the point about semicolons in Rust is:
1. ; is a separator, not a terminator.
2. a;b separates a and b.
3. a; is a special case which means a;nil(or whatever is the equivalent in Rust)
4. The last expression in a function will be the return value of the function.
5. If the last line in a function is "a", it returns a. If it's "a;", it returns nil(from 3)