|
|
|
|
|
by snovv_crash
1321 days ago
|
|
Interesting read. It seems to me here that they're trying to shoehorn ranges into coroutines though - yes it technically works, but it's not pretty or performant. If you have genuine data transformation tasks then I think ranges make a lot of sense. The kind of things that would be a 1-liner in Unix command line: cat foo.txt | grep "bar" | cut -d "," -f 3 | sort | unique | wc -l
This can be expressed really nicely with ranges in a way that wasn't possible, or at least readable, before. If you want to use ranges to reimplement coroutines then of course it will be slow and ugly.As usual with new features, they shouldn't be used everywhere, even if they could. I do agree with the complaints on the massive size though - I feel it could be implemented quite simply if they only wanted 80% of the features. |
|