we should really stop using C# namespaces and start using static classes as ‘modules’
you can import qualified:
using Renamed = SomeModule;
or you can import unqualified:
using static SomeModule;
Conversation
Can static classes have type members in C#?
1
1
yes, you can nest types, but there’s no facility to abstract over this; e.g. you can’t put an interface on a static type and there’s also no way to have an associated type in an interface
1
2
1ML, 1ML, 1ML!
1
I haven’t used any real MLs ... I remember a talk at Yow! a few years ago where someone was approaching the same issue from the OOP side and making all modules objects, but I can’t remember the speaker or the name of the language
1
Scala 3/Dotty has done a lot of great research into this stuff with the DOT Calculus (Dependent Object Types). Maybe that's what you were thinking of?
1
Scala's objects are much more complicated which requires lots of care to get right! AFAIK, I think 1ML is a bit easier thanks to being based on simpler dependent record types: people.mpi-sws.org/~rossberg/1ml/

