Poll: until
in addition to while
#8725
Replies: 14 comments
-
Just did a search of my code: I have zero occurrences of |
Beta Was this translation helpful? Give feedback.
-
@DavidArno |
Beta Was this translation helpful? Give feedback.
-
Good point. Yes, I found half a dozen or so uses of |
Beta Was this translation helpful? Give feedback.
-
That's what this survey is about 😄 |
Beta Was this translation helpful? Give feedback.
-
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); |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
This is much like the
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
I don't like the idea of adding new keyword. I prefer All keyword should be operator |
Beta Was this translation helpful? Give feedback.
-
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: |
Beta Was this translation helpful? Give feedback.
-
I think whether |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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 likeBeta Was this translation helpful? Give feedback.
All reactions