News for hackers. Stuff that matters.
Re:Callbacks as our Generation's Goto Statement by jeswin on Thursday August 15, 2013 @10:14PM (#6221840)
Here is an example where callbacks are even less intuitive:

  if not song.artist
    @getArtist song.id, (err, artist) =>
      song.artist = artist
      @save song
      @addToCatalog song
      #...
  else
    @save song
    @addToCatalog song
    #...
Callbacks will force you to move @save, @addCatalog, ... into a separate function. Completely messing up the logical sequence of operations.

There are no comments on this comment yet.