IntersectMBO / IntersectMBO/plutus
Allow `force` on anything and/or give up forcing builtins
- Dominant language
- Haskell
- Stars
- 1.6k
- Forks
- 508
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
**Michele | Harmonic** [reported](https://x.com/MicheleHarmonic/status/1845808985917563110) on X:
> allow force frames during evaluation to accept any return value, not only delayed and builtins
>
> so that stuff like
>
> `(force [[[(force (builtin ifThenElse)) (con bool True)] (con integer 0)] (delayed error)])`
>
> is valid
We've discussed this before (in private) and here's what Michael thought at the time:
> I’m increasingly pro “force anything”. It would really allow us to remove a lot of `delay`s, and `delay`s are a shockingly large amount of our programs. It would I think also make it easier to transition to not requiring us to `force` builtins at all - old programs which still did so would continue to be valid since they’re allowed to force anything.
Not forcing builtins is something that **Michele | Harmonic** [brought](https://x.com/MicheleHarmonic/status/1845808337167733070) up as well.
I'm not sure what my stance on the issue is: on the one hand removing things that don't have to be there is clearly beneficial, on the other hand I'm generally afraid of making the semantics of the language weirder. It would be great to implement this just to see how much performance improvement we get out of it. If it's just a few percent, I'd say it's not worth it.
I'll write to our scientists, maybe they happen to have a bright idea on how the semantics of allowing `force` on anything is actually fine.
Contributor guide
Assessment
This issue has not been assessed yet.