Hacker News new | past | comments | ask | show | jobs | submit login

Well, I stand corrected. Yes, there definitely is a performance penalty for promises.

Performance may be a tradeoff for the current engines, but I'm optimistic that it will be optimized away as it doesn't add too much semantics over the callbacks. Maybe error handling is tricky.

I would say they are superior to callbacks as object-oriented code is to procedural code - that also has some performance cost in many engines.

But, you are saying tradeoffs - plural. I, as an experienced web developer, am sincerely curious what any other can be?




> as object-oriented code is to procedural code

That is not a universally-accepted statement either.

I'm not interested in taking sides here, only pointing out that there are a wider variety of extant opinions than you seem to realize.


That was exactly my point. Object-oriented code is conceptualized as a next step but there are indeed cases where you would be better off procedural and there are many people who like procedural just better. Maybe it's my poor English, would this be more clear: Promises are as superior as to callbacks as object-oriented code is to procedural code. (Ok now it's not very readable :) )




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: