4 ms·
Always interesting with C posts! Two notes: - I'm pretty sure public symbols starting with "str" are reserved by the standard. - Declaring function arguments
by unwind 6y ago
Always interesting with C posts! Two notes:
- I'm pretty sure public symbols starting with "str" are reserved by the standard.
- Declaring function arguments as const is pretty silly for value types, imo.
- Google234 6y agoDoesn’t it stop you modifying them inside the function?
- account42 6y agoI'm not sure about C but at least in C++ having const on the prototype is meaningless as you can still have the arguments as non-const in the actual definition. Considering that C is usally less strict with these things I'd expect that to be the case there too.
- 1wd 6y agoFunction names starting with "str" followed by a lowercase letter are reserved. So technically "str" itself and "str_" are not.
- GoblinSlayer 6y agoString isn't a value type.
- unwind 6y agoYes it is, it's a small struct.