On Fri, Apr 13, 2012 at 7:26 PM, Jann Horn <[email protected]> wrote: > On Fri, Apr 13, 2012 at 10:07:38AM +0200, Oliver Leics wrote: >> What about option C, not using 'return': >> >> function (opts, cb) { >> thing(opts, function (err, data) { >> if (err) { >> cb(err); >> } else { >> var result = transform(data); >> >> cb(null, result); >> } >> }); >> }); >> >> Aside from readability and number of characters to type, is this >> option C better or worse than using return? > > Well, when you leave readability and so on away, what's left here? I think > that his option is the ugliest one because it requires you to indent the rest > of the code (unlike guard syntax).
First: Would you be so kind and stop talking in third person about me when I'm around? Thank you. Second: I know that this requires to intend the rest of the code. But what I really want to know is about technical reasons, not style. I want to know if it makes any difference to the JIT, v8, or whatever stacks around. Is not using return an improvement, an deterioration or does it make no difference for performance/code optimization. So, under the scope of the question of the OP: What about not using return? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
