4 ms·
This is a nice improvement but I still think C# does this better: Console.WriteLine(“Hello, World!”); https://learn.microsoft.com/en-us/dotnet/csharp/whats-ne
by lockhouse 3y ago
This is a nice improvement but I still think C# does this better:
Console.WriteLine(“Hello, World!”);
https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/top-level-statements https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/tu...
- Kuinox 3y agoI don't find it better. You now have an intuitive scope about what you can, or cannot do in the Top Level Statements.
- astrange 3y agoI like that this illustrates the C#/Java enterprise programming-ism that all identifiers must be in completely random namespaces to make it look fancier. Is it helping anyone that the print function is under Console? Why is an array a standard type but also a class named ArrayList under System.Collections? (Which seems to be deprecated and replaced with a class called List that's now under three namespaces instead of two.)
- fendy3002 3y agobut what is the better alternative (if any) though? In practice this can help to enable having the same Square class name, just one in MyPackage and another in SomeOtherVendorPackage.
- astrange 3y agoOne level namespaces is all you need. Anything else just encourages bikeshedding and Conway's Law issues.