Let's discuss the enums first. One of my goals is to make the language as
unambiguous as possible.
So code like
a.b
can be 2 things:
- 'a' a module and 'b' a symbol (type, var or function) of that module
- 'a' a struct and 'b' a member of that struct
I sometimes find it handy to isolate enum values from a regular 'namespace', especially
if there are multiple enum types in the same 'namespace'. If we would add this feature,
using the dot operator would make things more ambiguous (like a.b.c), so therefore I
tried the :: operator. I agree that this somewhat breaks the uniformity of the syntax...
As a sidenote, so does the current 'cast' operator, but the old C-style cast simply wasn't
very parse-able..
The second issue you mention, whether a single level of module name spacing is sufficient
is indeed another matter. I think there is a different post discussing that. There we concluded that
having a single level is already better than none and that adding more would only add more
complexity without too much gain. You can of course use something like
module qemacs_foobar;
and then import it like
import qemacs_foobar as foobar;
Porting a larger project to C2 would be a *very* nice way to see how some features fit!