16

Annoyance in C: using the same keyword for two unrelated things, process-long memory allocation and internal linkage. Looking at you, static.

The latter should really have been called "intern", just like there is "extern". Far more people would use it if it was named correctly.

History says "static" was chosen for compatibility, allowing older compilers to take new source files.

Comments
  • 0
    I tend to use #define's on static just to make things clearer. Doesn't excuse the design though. ++
  • 0
    @Lisanna I don't understand. There are three types of linkage: external, internal, none. If extern works for external, why wouldn't intern work for internal?
Add Comment