5 ms·
The more important question is how to deal with the resultant callback hell.
by ampdepolymerase 5y ago
The more important question is how to deal with the resultant callback hell.
- deleted 5y ago[deleted]
- bartvk 5y agoI think the author is specifically talking about those cases where performance really matters. You could still have callback hell, but a lot less so. As an aside, there is an alternative: passing a default value. This is Swift syntax: let favoriteIceCream = [ "Paul": "Chocolate", "Sophie": "Vanilla" ] let result = favoriteIceCream["Charlotte", default: "Unknown"]
- shwestrick 5y agoAn observation that I find kinda nice: passing a default value is essentially just a special case of CPS :)