Vitaliy Tyunisov
Jul 10, 2017 · 1 min read

“ You are just too emotional”

Agree, apologies for being so rude. But when you said that promises only used by lazy and dumb people (and who are new to Angular) this is also kind of offensive a bit, you know.

Concentrated on one paragraph because, first — the rest are obvious and/or depends on code styling, second — I totally disagree with your position on promises and offended by the words you use (lazy, newbies, just familiar, etc..) so I made it possible in my turn to call all this ‘bullshit’.

“ ‘async/await’ style is not declarative”

oh, yes they are. try/catch just goes to some abstract layer, similar you would have with observables approach also to handle some generic api calls logic. But as I said with observables you :

  • need to subscribe
  • chain your logic, hence create a mess very fast (when app is growing)
  • unsubscribe from all subscriptions to clean up memory
  • repeat this again and again and never forget, which is impossible even in not so large team, cuz not all of them are seniors usually

All these leads to cumbersome code obviously, if you have a good amount of business logic in your app. With promises you just need to await, that’s it.

let data = await this.someService.getSomeData();

    Vitaliy Tyunisov

    Written by