Hacker News new | ask | show | jobs
by philjackson 5305 days ago
May I start a meta-discussion about asyncronous helpers? Personally I find Seq less readable than normal cascading functions and even less readable than the good, old async library. Here's what the example would look like for async in coffeescript:

    seq = [ ]

    seq.push ( cb ) -> read prompt: 'Username: ', cb
    seq.push ( cb ) -> read prompt: 'Password: ', silent : true, cb

    async.series seq, ( err, [ username, password ] ) ->
      console.log "#{username}, '#{password}'."
      process.stdin.destroy()
Very readable and very simple.