I like "copy pasta" :)  I'm not really worried about it from the
perspective of going out to the world. Typically inline comments scream
"I'm a function!" or "I don't understand WTF is going on!" :)  It's just
more a code smell that might lead to a refactoring.

I dunno how sensitive JS people are to calling more functions from a
performance perspective, though.  My natural inclination is to have a lot
more functions and a lot less long runs of procedural code.


On Sat, May 3, 2014 at 11:35 AM, Raymond May Jr.
<notifications@github.com>wrote:

> In public/WBLogger.js:
>
> > +    var self = this;
> > +
> > +    // assert(self.constructor !== WBLogger, 'can\'t initialize WBLogger');
> > +    assert.string(namespace, 'WBLogger namespace must be a string');
> > +
> > +    var namespaceMap = WBLogger.namespaces;
> > +
> > +    // if the namespaced logger already exists, use it
> > +    if (namespaceMap[namespace] instanceof WBLogger) {
> > +      return namespaceMap[namespace];
> > +    }
> > +
> > +    // save the namespace
> > +    self.namespace = namespace;
> > +
> > +    // cache the instance
>
> Some are copy pasta. We trim all comments on build anyway, if it's too
> much noise I can remove, but we love comments in our js projects.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/wunderlist/wunderbits.core/pull/35/files#r12255714>
> .
>



--