Are there contemporary programming languages that do NOT have the ability to import functions or values or whatever from other files? Are there situations in which that would be a feature?
the_sisko @ the_sisko @startrek.website Posts 2Comments 109Joined 2 yr. ago
the_sisko @ the_sisko @startrek.website
Posts
2
Comments
109
Joined
2 yr. ago
Deleted
AITA: A new Subspace Community
Deleted
Depressing but not wrong
Deleted
Depressing but not wrong
Deleted
Permanently Deleted
Deleted
Permanently Deleted
I'd argue that's not true. That's what the extern keyword is for. If you do
#include
, you don't get the actualprintf
function defined by the preprocessor. You just get an extern declaration (though extern is optional for function signatures). The preprocessed source code that is fed tocc
is still not complete, and cannot be used until it is linked to an object file that definesprintf
. So really, the unnamed "C preprocessor output language" can access functions or values from elsewhere.