4 ms·
> The point of the colored function is that the color is a leaky abstraction I disagree with this take; I understand the point of the original “What color is y
by shakow 6y ago
> The point of the colored function is that the color is a leaky abstraction
I disagree with this take; I understand the point of the original “What color is your function?” as colored functions creating an impassable divide between Promise-wrapped values and sync code.
Indeed, in the end, the author mentions e.g. C# as not being colored, because even if sync/async functions are different, it features escape gates to unwrap promises and bring them back into the sync world.
- Analemma_ 6y agoC# isn't exactly doing a great job at escaping the color world, judging by the number of bugs I've seen where calling .Wait() or .Result on an async function from a sync one caused the entire application to deadlock.