[proposal] allow more compact 'using static' syntax #3719
Replies: 10 comments
-
I just don't understand why people are so persistent on "compact". Reading: honestly, people seldom look at usings. Since there are separators( The key difference between |
Beta Was this translation helpful? Give feedback.
-
I just don't understand why people... The proposed feature is optional. You don't have to use it if you don't want to The goal should be making it easier to use in every way... I agree, which is why being able to see and study more of the code on the screen at once without scrolling or other fiddling--which is what reducing line count does--is a considerable benefit. people seldom look at usings... You contradict yourself. If they are seldom looked at, then wouldn't you want to get them out of the way? ...make git merge easier... Not all code is version controlled, but even so, see above, viz., the proposed syntax is optional. I haven't typed Non-sequitur. The proposal only concerns The key difference between using and expression bodies... Well, another major difference is that |
Beta Was this translation helpful? Give feedback.
-
I think where i land is simply this: i dont' think about I don't want to invest in language features here because it's genuinely an area of a person's code that i effectively don't expect them to be editing. And i don't see there being real value in changing the language here for things that users will not be touching the majority of the time. |
Beta Was this translation helpful? Give feedback.
-
If you don't care about them, then this proposal shouldn't affect you, so I'm not sure why you have an opinion about it.
@CyrusNajmabadi I'm brand new to this forum, so I'm not sure if you are an official guardian of C#. I'm also not sure about the militancy of discussion culture accepted here, so I certainly don't want to offend. Given those caveats, I humbly submit that it seems to me like you "expect" everyone to use, focus on, ignore, hide, or automate the various language features in a universally specific way. Again, apologies if the goal of eliminating variation in the personal style and use C# (not sarcastic) is a widely acknowledged consensus of this forum. |
Beta Was this translation helpful? Give feedback.
-
This doesn't match with my experience. When I navigate to a definition, I end up at the definition, not at the top of the file. Same when I jump to a failing unit test, ask git to show me changes, review diffs before making a commit, reviewing a PR, and so on.
You're arguing against yourself here. If the feature isn't going to be widely used, why should the team invest the (large) amount of effort to design, develop, test, and maintain it? New features need to be more than just useful or good ideas or helpful. They need to be massively valuable. In practice, this seems to break down as either "widely useful to many millions of C# developers" (e.g. expression bodied members) or "critically valuable to a specific segment" (e.g.
Welcome! C# doesn't have individual guardians - there is a language development group within Microsoft that stewards the language. The members of that group are all here in this C# repo, with differing levels of engagement. @CyrusNajmabadi is a part of that group. No matter how you measure it, changes to C# are expensive - both initially, and in the long term, as the language is maintained. Every proposed idea for the language has to stack up in a dozen different ways; very few of them actually get built.
As a whole we're hard to offend - as long as you're genuinely engaging with the discussion, you'll find it a lot of fun here. That said, ideas will be critiqued, questions asked, and assumptions challenged. Some people find that tough going. |
Beta Was this translation helpful? Give feedback.
-
@theunrepentantgeek wrote:
Thanks for the clarifications and guidance. It sounds like my proposal will be a dead letter. However, since I feel it is a good faith proposal that doesn't feel patently frivolous to me (do you disagree?), rather than close the issue at this point, I'll take the opportunity to observe and learn how the (presumably tortuous?) consideration process proceeds to some official conclusion, |
Beta Was this translation helpful? Give feedback.
-
A few reasons I have an opinion on it: First, I'm a member of the language design group. So it's literally part of my job description to determine which features make it into c# and which do not :-) Second, I am a developer on the C#/VB ide. So changes to the language have to be designed and implemented by us. Third, I've been involved with, and using C# for more than 20 years now. So that had definitely informed my perspective on where I think the language should focus it's priorities.
I don't expect that. I simply don't think (and haven't gotten evidence), that an investment here is warranted. :-)
Feel free to engage. This repo is about discussion :-) I don't think there's anything torturous here. It's just a process of evaluation and deciding what provided enough value to go in the language. |
Beta Was this translation helpful? Give feedback.
-
@CyrusNajmabadi In case that wasn’t a typo, glenn-slayden is saying the process is presumably twisting or convoluted. As opposed to saying that it is excruciating or that it causes suffering. Though, @glenn-slayden, in my experience, it’s neither. It’s only that such a mature and widely used language has a very high bar for what gets into it. |
Beta Was this translation helpful? Give feedback.
-
Not sure if I was blundering in here or not, but I did not know any of this; In any case, I apologize for any offense.
Indeed, I'm starting to understand that. |
Beta Was this translation helpful? Give feedback.
-
No offense taken. But it is important to me that opinions are welcome here. Even if they differ from the positions you are in favor of :-) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
(for the purposes of demonstration):
C# 6.0 introduced the
using static
directive:Proposing that a future version of C# should optionally allow the following more compact syntax:
Note that this optional form would align
using static
syntax with existing syntax for (optionally) combining local declarations for variables having the sameType
.Beta Was this translation helpful? Give feedback.
All reactions