+1


From:   Paul Lindner <[email protected]>
To:     [email protected], 
Date:   07/26/2011 02:51 AM
Subject:        javascript readability..



Hi,

I'm curious to know what people think about some of the idioms in the JS
code you find in shindig.  There's an awful lot of stuff like this:

shindig.foo = function(){
  //...
  var myFunction = function() {
     }

  return {'foo': myFunction,
            'bar': function() {
               return 'bar';
            }};
}();


Just search for @member to see the various places.

What would people think if we moved to fully defined names for
function/method definitions instead?

You could still wrap this inside a closure if you wanted local scope:

function() {
  shindig.foo.foo = function() {
     ...
  }
  shindig.foo.bar = function() {
     ...
  }
}();

-- 
Paul Lindner -- [email protected] -- linkedin.com/in/plindner



Reply via email to