3 ms·
I 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 asi
by bartvk 6y ago
I 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 6y agoAn observation that I find kinda nice: passing a default value is essentially just a special case of CPS :)