Giter VIP home page Giter VIP logo

Comments (7)

samjewell avatar samjewell commented on July 26, 2024

ps. I can submit a PR, just let me know which of the above things you'd prefer. Upon reflection probably the very last suggestion right?

from art-of-node.

zeke avatar zeke commented on July 26, 2024

@samjewell I'm not sure your example will work, as the thenRunThisFunction will be invoked before the asynchronous waitAMinute callback is called.

If you are still stuck on this (which I doubt as it's been over a year 😵), please open a PR. Thanks!

from art-of-node.

samjewell avatar samjewell commented on July 26, 2024

what would you say to renaming waitAMinute to waitAMinuteAsync? For extra clarity...

from art-of-node.

zeke avatar zeke commented on July 26, 2024

The fact that one of waitAMinute's arguments is a function is a clear indication that it's an asynchronous function. But if you think changing the name makes it more clear, please send a PR and I'll have a look.

from art-of-node.

ferusinfo avatar ferusinfo commented on July 26, 2024

I think that for us, developers - this is clear that this function will be an async one. But if we want to clarify everything related with javascript callback functions, their (people who are learning from this repo) brains are already melting with that amount of information. We need to treat them (without insulting!) like kids who are learning alphabet. Everything just must be big and bold ;)

from art-of-node.

samjewell avatar samjewell commented on July 26, 2024

The fact that one of waitAMinute's arguments is a function is a clear indication that it's an asynchronous function

Is it? Couldn't I have a function that takes another function as an argument, but operates synchronously? I'm sure some lodash functions do that. Eve if they don't I could write one, surely?

Agreed to someone who has some experience with JS this 'looks like' an async function, but the only way to find out for sure is to try it out / look at the sourcecode / docs, isn't it? Or am I wrong somewhere?

from art-of-node.

zeke avatar zeke commented on July 26, 2024

Function renamed here: #65

from art-of-node.

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.