Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cljs callback experience #27

Open
peterschwarz opened this issue Jun 22, 2015 · 1 comment
Open

Improve cljs callback experience #27

peterschwarz opened this issue Jun 22, 2015 · 1 comment
Milestone

Comments

@peterschwarz
Copy link
Owner

Either:

  • use a more Node-stye callback signature. For example:

    (open-serial-board :auto-detect (fn [err board]
       ; Do stuff with the board
       )
    
  • Return a Promise or promise-like structure for the board result.

@peterschwarz peterschwarz added this to the 3.0.0 milestone Jun 22, 2015
@metasoarous
Copy link

Nice call. I'd be inclined to say callbacks, since they're ultimately simpler, and you can still hook a promise up to it. Then again, perhaps you could have two arities; one that takes a callback, and one that just returns a promise? That would give some added flexibility.

FWIW, I'm leaning towards callbacks for pin-ctrl...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants