The yield! keyword #4447
-
Hi guys, I'm tired of writing a boilerplate every day at work:
I saw a great solution in the F#: https://docs.microsoft.com/ru-ru/dotnet/fsharp/language-reference/sequences#the-yield-keyword Code
much more compact and readable |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
To summarise discussions elsewhere... Introducing a keyword is believed to imply it's an O(1) operation when the only possible compiler implementation is O(n). This makes the feature extremely likely to conceal performance issues, creating a tiger-trap for future developers. Writing the boilerplate might be tedious, but the LDM prefers it to the creation of dangers. |
Beta Was this translation helpful? Give feedback.
#378