I like that they're updating the standard more frequently. I wonder what the language will look like in 30 years after ten of these updates have gone through (assuming they keep it up).
Besides modules, I would like nested namespaces i.e.
namespace boost::filesystem {}
instead of
namespace boost { namespace filesystem {} }
Also, I would like strongly-typed enums to be implicitly castable to their base type, e.g.
1 2 3 4 5 6 7 8 9
|
enum class something {
a,
// ...
count
};
// ...
std::array<T, something::count> array;
array[something::a] = T();
|
should work as expected without ugly casts. I know you can use std::map but that requires dynamic allocation where it's not always desired. I can't remember what I wanted this behaviour for but I ended up just using a normal enum inside a namespace to scope its members.
Alternatively, just get rid of strongly-typed enums altogether and replace
enum class
with
enum namespace
. Truth be told, I never wanted strongly-typed enums, I just wanted enum symbols to be scoped like they are in C#. I don't see what the benefit is of strongly-typed enums besides the scoping rules.