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).
pgpP6evCsYHIr.pgp
Description: PGP signature
