3 ms·
I can think of three: enum, class, and struct. What’s the fourth? And what’s the big deal if you encounter some code that uses a different one?
by mikeash 9y ago
I can think of three: enum, class, and struct. What’s the fourth? And what’s the big deal if you encounter some code that uses a different one?
- bsaul 9y agoWhy can't we have just one way of declaring and naming namespaces using something called... namespaces ? There are probably goos reasons for doing it this way, but it always feels weird having to declare all your namespace's types inside one of its member.
- mikeash 9y agoIf you allow nesting things inside types, then those act as namespaces, so you’ll always have multiple ways even if one of those ways is explicitly called “namespace.” I agree the language should have it, but it doesn’t seem like a particularly big deal.