-
Notifications
You must be signed in to change notification settings - Fork 1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poll: until
in addition to while
#562
Comments
Just did a search of my code: I have zero occurrences of |
@DavidArno |
Good point. Yes, I found half a dozen or so uses of |
That's what this survey is about 😄 |
In 60 years nobody has felt the need to add it to C/C++. Not even D added it. I just don't think it's necessary. I'd be much more for exploring allowing the do {
PullNewItems(itemlist, source);
Process(itemlist);
} while !(list.IsFull || source.IsEmpty); |
It would be interesting to have a poll for this, though I doubt that the team is susceptible to that neither. Should that poll be concurrent to this one or better delayed until many more have voted here? |
I have my doubts that the team are considering these polls much in general. The participating audience here is just too small. It's not like UserVoice where we're amassing thousands of votes. I'll put up a separate proposal/discussion for the |
The idea of the polls is to get a rough overview about how the community here is thinking in general without provoking a confusingly long discussion where the overview could be lost quickly. |
This is much like the
|
I don't think that's a valid argument. In 60 years, nobody has felt the need to add LINQ or expression-bodied members or pattern matching to C/C++ either. Especially C is a very different language than C#, with very different goals. |
Sweeping language features are a little different from minor grammar tweaks (well, expression-bodied members definitely fall into that latter category). All it does is move the negation from the expression and into the keyword, adding another way of doing something you could already do. Is it more readable? Perhaps in some scenarios. It's exceptionally minor, but in my opinion so is the benefit. And it may open the door to applying elsewhere in the language. We've already had requests for Even looking at the discussion of removing the parenthesis to make negation a little "clearer" has only opened a can of worms of horrific code rife with ambiguities. |
I don't like the idea of adding new keyword. I prefer All keyword should be operator |
Meanwhile I'd prefer having Starting a 'sentence' with But as a final conditional keyword in a do-loop I still think that it can be useful: |
I think whether |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Because it always comes up from time to time 😃
The
until
keyword is available in many other programming languages and is made much use of. In C-derived languages however it does not exist, because it can be expressed bywhile (!(...))
. Nevertheless, there seem to be quite some people who would like to have it additionally, not only in C#.This poll is not about discussing
until
! It shall only be a rough survey on how community members currently think.Sample:
vs.
Poll
while (!...)
while (!...)
while
constructwhile(!...)
as reading 'until' if they likeThe text was updated successfully, but these errors were encountered: