3 ms·
Regarding the second code snippet - I've never seen this language feature before. Obviously there are things sometimes called generators implemented as structu
by happytoexplain 3y ago
Regarding the second code snippet - I've never seen this language feature before. Obviously there are things sometimes called generators implemented as structures, where 'step' or 'next' is just a normal method, but is there a real world example of what is shown?
- Dobiasd 3y agoThanks for the feedback! My code snippets in the article don't use any real/existing language. C# for example, is quite explicit with the transformation of generated to state machines, but also does not provide such methods, as far as I know. I've just added a comment explaining this choice: https://github.com/Dobiasd/articles/commit/f44b897f2a4d20aa957775f0ebe1f50fdfd21b8d https://github.com/Dobiasd/articles/commit/f44b897f2a4d20aa9...