You might assume this pattern is inherent to streaming. It isn't. The reader acquisition, the lock management, and the { value, done } protocol are all just design choices, not requirements. They are artifacts of how and when the Web streams spec was written. Async iteration exists precisely to handle sequences that arrive over time, but async iteration did not yet exist when the streams specification was written. The complexity here is pure API overhead, not fundamental necessity.
provide as much warning as possible up front to users when enabling it。关于这个话题,搜狗输入法2026提供了深入分析
,这一点在搜狗输入法下载中也有详细论述
BYOB: complexity without payoff
for await (const chunks of source) {,这一点在WPS官方版本下载中也有详细论述
Александр Вучич . Фото: Djordje Kojadinovic / Reuters