Skip to content

Comment on Node.js - A Giant Step Backwardsparent

Comments

Excuse me, but that's what you call elegant?

From a readability standpoint I'll take the "old" version any day:

   function getFromDB(foo) {
      var result = asynchronousCache.get("id:3244");
      if ( null == result ) {
         result = asynchronousDB.query("SELECT * from something WHERE id = 3244");
      }
      return result;
   }
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.