Re:The Rust module system is too confusing
by neikos on Wednesday January 11, 2017 @08:19AM
(#13373689)
I fail to see how the usage is different? They both reference things that are 'external' eg. already compiled etc...
[ Parent
| on HN ]
Re:The Rust module system is too confusing
by marcoms on Wednesday January 11, 2017 @09:15AM
(#13373967)
I mean if anything the syntax should me more specialised as you go into sub-keywords, which makes sense in this industry (e.g. ISO 8601). The problem is that `extern` seems to have been taken from C++ and extern crate is almost tacked on (or that's the impression I get).
Comparing with other languages, Rust looks to be the only instance where two keywords are required to simply require a module/library, which sticks out to me.
Re:The Rust module system is too confusing
by Manishearth on Wednesday January 11, 2017 @12:04PM
(#13375423)
No, you can also define `extern "C" fn foo() {}` with a body, which creates a function that can be called from C.