run(() => { return foo })
looks better than, and assuming pre-existing knowledge of what `run` does, is more understandable than (() => { return foo })()
but this is also a fairly contrived exampleNew abstractions have a cost, and "clever" abstractions tend to confuse the average developer more than the benefit they provide.
If there's a problem with an IIFE (yes, they can be abused), the usual approach is to replace it with a named function definition. This works in their React example as well--rather than (necessarily) creating a new component as they suggest, the standard approach is to add a named rendering helper in the function closure that returns JSX.
Its not about number of characters, its about reasoning that the inline function that you just wrapped in parens is then called later, potentially after many lines. At least with `run` it's immediately clear based on the name that you are running the function.
Edit: This is pretty funny. I'm a parensaphobe! (not really) https://www.reddit.com/r/ProgrammerHumor/comments/qawpws/the...