Hacker News new | ask | show | jobs
by neikos 3442 days ago
I fail to see how the usage is different? They both reference things that are 'external' eg. already compiled etc...
2 comments

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.
No, you can also define `extern "C" fn foo() {}` with a body, which creates a function that can be called from C.