Live data from Hacker News

Welcome to C# 10

devblogs.microsoft.com

1–10 of 59 posts

Re: Welcome to C# 10

#2
Oh wow. I do not like that "global using". It harkens to the auto-loading issues I've had with Rails. "Where was this defined? I dunno! It probably works here, though!!1"

I generally don't like a random file impacting several other files. Extension methods are ... tolerated and ... "fine" but I still feel unpleasant using them.

File-Scoped namespaces seem like someone's really, really tired of having nested folders and seems actively unnecessary.

I like natural lambda types

Good update on parameterless structs. I assumed that's how they worked already. I haven't used C# in 2 years; but you could do that with classes back when, so I assumed it would be the same with structs.

Constant interpolated strings is nice.

Extended property patterns is fine, just probably not for me.

Re: Welcome to C# 10

#3

Oh wow. I do not like that "global using". It harkens to the auto-loading issues I've had with Rails. "Where was this defined? I dunno! It probably works here, though!!1" I generally don't like a random file impacting several other files. Extension methods are ... tolerated and ... "fine" but I still feel unpleasant using them. File-Scoped namespaces seem like someone's really, really tired of having nested folders a…

I do not like that "global using" as well. I wonder why they added it.

Re: Welcome to C# 10

#4

Oh wow. I do not like that "global using". It harkens to the auto-loading issues I've had with Rails. "Where was this defined? I dunno! It probably works here, though!!1" I generally don't like a random file impacting several other files. Extension methods are ... tolerated and ... "fine" but I still feel unpleasant using them. File-Scoped namespaces seem like someone's really, really tired of having nested folders a…

> Oh wow. I do not like that "global using". It harkens to the auto-loading issues I've had with Rails. "Where was this defined? I dunno! It probably works here, though!!1"

It's been a feature of Visual Basic .NET for a very long time (from recall: at least 2008), I'd hope Microsoft heavily queried user feedback before implementing.

https://docs.microsoft.com/en-us/visualstudio/ide/how-to-add...

Re: Welcome to C# 10

#5
C# is becoming the C++ of managed languages. I wish they would stick to a smaller set of more powerful features… like an earlier C# with hygienic macros or something.

Re: Welcome to C# 10

#7
Not all of these changes sound good to me. Some sound like very niche cases that I now have to make a decision about when it comes to coding guidelines because there's always going to be that one developer in our company who wants to show off, even if it's not the right tool for the job.

Re: Welcome to C# 10

#8

Oh wow. I do not like that "global using". It harkens to the auto-loading issues I've had with Rails. "Where was this defined? I dunno! It probably works here, though!!1" I generally don't like a random file impacting several other files. Extension methods are ... tolerated and ... "fine" but I still feel unpleasant using them. File-Scoped namespaces seem like someone's really, really tired of having nested folders a…

File-scoped namespaces is nice to not have every class already sitting at one level of indentation. I don't see what it has to do with nested folders.

Re: Welcome to C# 10

#9

Oh wow. I do not like that "global using". It harkens to the auto-loading issues I've had with Rails. "Where was this defined? I dunno! It probably works here, though!!1" I generally don't like a random file impacting several other files. Extension methods are ... tolerated and ... "fine" but I still feel unpleasant using them. File-Scoped namespaces seem like someone's really, really tired of having nested folders a…

Doesn't really bother me, so long as the global usings are only kept to a single file. Intellisense will tell you the full namespace, then you can just see if you've got that namespace in the file you're in or in your dedicated global usings file.

Re: Welcome to C# 10

#10
The most interesting feature here (though included only as a preview) is static abstract members on interfaces, which will make things like generic math possible.
Post reply on HN