Coder Social home page Coder Social logo

Comments (9)

jonathanong avatar jonathanong commented on May 5, 2024

i think the best thing about yield* next is that now next is explicitly a generator.

from compose.

tj avatar tj commented on May 5, 2024

that's not even remotely enough of a gain to worry about IMO, add one console.log() per request and you take a bigger hit. If anything we could improve co's perf by adding a shared scheduler but not a huge deal really. I don't like the context switching between yield and delegation

from compose.

jonathanong avatar jonathanong commented on May 5, 2024

i'm not worrying about it :P it's just free to me.

from compose.

tj avatar tj commented on May 5, 2024

it would kinda almost be nicer if javascript would just auto-delegate when you yield a generator, maybe make yield * the inverse haha.. meh

from compose.

jonathanong avatar jonathanong commented on May 5, 2024

i wish there were no stars anywhere

from compose.

tj avatar tj commented on May 5, 2024

that too

from compose.

jrpereira avatar jrpereira commented on May 5, 2024

"i wish there were no stars anywhere"

That really describes the sentiment. :)

from compose.

dzcpy avatar dzcpy commented on May 5, 2024

+1
Is there any significant drawbacks when using yield* like memory consumption or cpu usage?
IMO it should be not too hard, and it also has less chance to break something. So hopefully it will be finally changed.

from compose.

jonathanong avatar jonathanong commented on May 5, 2024

there really isn't any downside, but it's probably not worth the cognitive overhead for new beginners, especially with async/await coming along.

from compose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.