Replies: 9 comments
-
I'd like #145 is also considered. |
Beta Was this translation helpful? Give feedback.
-
Is it an option to split the doc comments out of the language? |
Beta Was this translation helpful? Give feedback.
-
Should be generalized to |
Beta Was this translation helpful? Give feedback.
-
@agocke or @jaredpar, could you clarify on a comment given to the readonly functions on structs section?
The current proposal was (well before the LDM meeting) updated such that the |
Beta Was this translation helpful? Give feedback.
-
Yep and LDM loved that suggestion. And by love I mean they made faces at me. 😄 |
Beta Was this translation helpful? Give feedback.
-
@ufcpp would be considered if some member of the LDM championed it. |
Beta Was this translation helpful? Give feedback.
-
If we need to extend A IEnumerator<T,V>
{
T Current;
bool MoveNext(V value);
}
IEnumerable<T,V>
{
IEnumerator<T,V> GetEnumerator();
}
////
IEnumerable<object,(bool,int)> GetItems()
{
foreach(var item in items)
{
(var stop,int count) = yield return item; // yield will return value it got from MoveNext
if(stop)
{
// Do some cleanup logic
yield break;
}
}
}
////
foreach(var item in GetItems()) // IEnumerable<object,(bool,int)>
{
//DoSomething with item
continue (false,0); // MoveNext with parameter must continue with that parameter
} It not directly related but I think if we extend feature relate to this anyway it would be easier to do it all in one go |
Beta Was this translation helpful? Give feedback.
-
@Thaina I find that code confusing, because it changes what C# does tend to add features in groups which share a theme, but each of those features should still be properly considered on its own merits. |
Beta Was this translation helpful? Give feedback.
-
@svick I have seen this feature from javascript iterator system that it could send the state of the iteration back to iterator to decide more logic to do work. Most of the time it used to send the state to let iterator decide that should it continue iteration, as oppose to letting the iterating side decide when to stop, and iterator only stop when it iterate to the last. It could also use to switching logic of iteration on the fly I think it useful in some situation |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
C# Language Design Notes for September 19, 2018
Agenda
Triage:
Beta Was this translation helpful? Give feedback.
All reactions