News for hackers. Stuff that matters.
Re:Bluebird in the wild: Advanced promise-based workflows by wrong_variable on Tuesday April 19, 2016 @10:25AM (#11527167)
Callbacks are fine, if you treat them as monads and only use them for notification purposes.

In liveScript

do

  error,output <- fs.readFile "helloWorld.txt" 
  console.log output.toString() # => "hello world from txt file"
you can combine that with co-routines to create really powerful abstractions, without the massive memory footprint of promises.
Re:Bluebird in the wild: Advanced promise-based workflows by adrusi on Tuesday April 19, 2016 @11:00AM (#11527448)
Treating callbacks as monads is literally the definition of promises. If that code does the same thing it did in 2011 when I last looked at livescript, that's not treating callbacks as monads, thats just borrowing a syntax that Haskell uses for monads and using it for callbacks.
Re:Bluebird in the wild: Advanced promise-based workflows by spriggan3 on Tuesday April 19, 2016 @11:10AM (#11527517)
> In liveScript

i.e. use a different language because callbacks in javascript suck ? I prefer promises thank you. And promises ARE monads. No need for liveScript.