Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

More FAQs #248

Open
brson opened this issue Jan 14, 2016 · 11 comments
Open

More FAQs #248

brson opened this issue Jan 14, 2016 · 11 comments

Comments

@brson
Copy link
Contributor

brson commented Jan 14, 2016

There are still FAQs not answered:

  • "What does the name 'Rust' mean?"
  • "Why does a tiny program like "Hello World" produce such a large executable file?" - answer.
@antoyo
Copy link

antoyo commented Jan 14, 2016

The second question is about RAM usage, not executable size.

@brson
Copy link
Contributor Author

brson commented Jan 15, 2016

Comparison to swift would be useful.

@Manishearth
Copy link
Member

@antoyo Yes, but the additional RAM usage is caused by a larger executable (which is loaded into RAM).

For swift I guess something along the lines of it having a very similar type system without the ownership/borrowing, and using automatic reference counting for memory safety?

@antoyo
Copy link

antoyo commented Jan 16, 2016

@Manishearth In the thread on rust-lang, I learned that using the system allocator lower the RAM usage. Does this mean that jemalloc is using 10 MB of RAM?

@Manishearth
Copy link
Member

That could be the case, but I doubt it; it probably means you're statically linking to jemalloc which increases the binary size (whereas the system allocator exists on your machine anyway)

@brson
Copy link
Contributor Author

brson commented Jan 20, 2016

"What's the point of inner attributes?" / "Why are there so many attribute forms?" / "Why are doc comments attributes?"

@petrochenkov
Copy link

"Why does my Windows application show console?"

@kud1ing
Copy link
Contributor

kud1ing commented Feb 2, 2016

"Which string type should i use?"

http://hermanradtke.com/2015/05/03/string-vs-str-in-rust-functions.html

@kud1ing
Copy link
Contributor

kud1ing commented Feb 2, 2016

"Can i write a function that accepts both &str and String?"

http://hermanradtke.com/2015/05/06/creating-a-rust-function-that-accepts-string-or-str.html

@F001
Copy link

F001 commented Mar 23, 2016

Why there is no incremental/decremental operators ( ++/-- ) in Rust?

Well, I know these operators lead to troubles, but I can't find the canonical explanation.

@alilleybrinker
Copy link
Contributor

I am happy to take a crack at answers to the above-listed questions. I can probably whip up reasonable answers to all of them but the naming question. If anyone familiar with the history has a good explanation for the name, I'm happy to write up an answer that explains it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants