delete icon indicating copy to clipboard operation
delete copied to clipboard

drop the `.promise` method

Open tunnckoCore opened this issue 9 years ago • 5 comments

Or use some promise lib or do some workaround. Currently it calls the glob.sync method which not make any sense - so, something like async response/method sync operation. With that .promise method you just return a promise, but actually behind the scenes everything is sync, nothing is async. Does make users think they really do some async operation, because they got promise, but in real it's not async.

Hope you got correctly my state. Just noticed some things and share thoughts. Dropping it make more sense instead as it is currently. Or at least, make a not on readme, imho.

Cheers.

tunnckoCore avatar May 03 '16 01:05 tunnckoCore

I don't use promises, I'll never use promises. We can remove the method or if you want to do a pr that's fine too

jonschlinkert avatar May 03 '16 02:05 jonschlinkert

I don't use promises

Same here, or not so much. I'm just thinking for future.

I'll never use promises

hm, why?

tunnckoCore avatar May 03 '16 03:05 tunnckoCore

hm, why?

This describes why better than I can: https://github.com/maxogden/art-of-node#language-abstraction

Rules I try to follow:

  • the more generalized the library is (like microlibs), the more you should stay away from abstractions (some popular developers are trending towards converting ALL of their libraries to use promises. IMHO is a huge mistake and will backfire eventually)
  • abstractions are completely fine (and necessary) in higher level libraries that are more specialized

jonschlinkert avatar May 03 '16 04:05 jonschlinkert

Same here.

is a huge mistake and will backfire eventually

Absolutely!

tunnckoCore avatar May 03 '16 15:05 tunnckoCore

I'll never use promises

lol. I use promises all the time now. I disagree with myself in the past.

jonschlinkert avatar Jul 07 '17 04:07 jonschlinkert