News for hackers. Stuff that matters.
Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by manigandham on Thursday August 06, 2020 @03:07AM (#24068767)
That’s not true. You can use aliases just fine. .NET is great with this.
Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by greggman3 on Saturday August 08, 2020 @03:08AM (#24089696)
in one file declare

    namespace foo {
      class Bar ...
    }
In another file declare

    namespace foo {
      class Bar ...
    }

Now use both foo.Bar from file 1 and foo.Bar from file 2 in the same project. Aliases don't help with this
Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by manigandham on Saturday August 08, 2020 @03:54AM (#24089874)
Different assemblies with the same assembly name, namespace and class? Use an extern alias (which is how different versions of the same assembly can be used if necessary): https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...

Different assemblies with different assembly names but same namespace and class? Just use the fully qualified type name (and alias it for a shorter name).

Single assembly/project and namespace with the same class in multiple files? If you're just spreading out the code then use partial classes, otherwise why would you define the same type twice?

C# (and other languages) that use virtual namespaces can do everything that file-based namespaces can do, but also support many more scenarios.