W-what are namespaces meant to do in C++? How do they work? What is up with headers and function declarations?? WHAT IS GOING ON WITH STATIC FUNCTIONS????
@Fenreliania Namespaces are just an organizational thing, you don't need to use them if you don't want, or you can put everything in the same namespace.
Header declarations are a legacy from C, and are needed for the compiler building one file to know the functions in another file.
"static" can mean one of three things, depending on context. In a class, it's just like C# or Java, common to all instances. In a function, it's a variable in static memory. Outside either, it's local to the file.
@impiaaa @Fenreliania static in a class, static in a function, and static on a _variable_ in a namespace (e.g. a "global" variable) all mean "allocate this variable in static memory when the program is executed"
static as a function modifier is...basically unrelated, i think C overloaded the keyword because they wanted to avoid adding more keywords to the language early on
@chr y'know, I know we're living in an age where a new LLVM frontend is made every day, but they're all so high-concept. I wish someone would make a "better C," just the same thing but without all these inconsistencies and ambiguities.
@lifning @chr I've considered Cython, but it's still basically dynamic. And, are you really suggesting a Scheme as a serious C replacement? 😆