3 ms·
> To distinguish between an instance and a namespace? I’m with OP here. C# proves that . reduces the noise substantially.
by metaltyphoon 5y ago
> To distinguish between an instance and a namespace?
I’m with OP here. C# proves that . reduces the noise substantially.
- onlyrealcuzzo 5y agoI think the question should be less about ergonomics and more about does the distinction matter. I don't know enough about C# to know if it matters. From everything I know, it's a really well designed language, so I'm guessing they made the right call. It doesn't mean it's the right call everywhere.
- frou_dh 5y agoOnly somewhat related, but when reading docs/comments that mention some method `class.method`, it's annoying when that's ambiguous and could mean either a static method or an instance method. In the Ruby world, I think they have the convention of writing `class#method` in docs/comments when mentioning an instance method, and `class.method` when mentioning a static method.
- steveklabnik 5y agoFun trivia fact: I tried to bring that convention over to Rust, but enough people didn't like it than in the end, we don't do that.
- metaltyphoon 5y agoInteresting mention about the docs. I see what you mean. I have been doing C# for over a decade and I guess that after a bit you are just blind to this kind of stuff. I guess it never "really" matter to me when coding, but I can see it as an annoyance on the documentation side. Perhaps Microsoft can do a better job of splitting static methods from instances on the docs. i.e https://docs.microsoft.com/en-us/dotnet/api/system.console.writeline?view=net-6.0 https://docs.microsoft.com/en-us/dotnet/api/system.console.w...