4 ms·
Perhaps there could exist a middle ground for cases where it does not risk significant "random" memory bloat and similar issues. I 100% think there are edge cas
by runevault 4y ago
Perhaps there could exist a middle ground for cases where it does not risk significant "random" memory bloat and similar issues. I 100% think there are edge cases where laziness has value.
Although in your fromMaybe case couldn't you just have it generate short circuiting code under the hood instead of always evaluating? That isn't necessarily quite the same thing as laziness.
- mibsl 4y agoShort circuiting is a special case of laziness. It's local only, so no thunks are required. The beauty of functions like fromMaybe is they're only that - just plain, regular functions. No special casing under the hood required.