tokiwa-software / fuzion

The Fuzion Language Implementation
https://fuzion-lang.dev
GNU General Public License v3.0
46 stars 11 forks source link

Use Effects for resource limitations (heap, stack, time, CPU usage, etc.) #2471

Open fridis opened 7 months ago

fridis commented 7 months ago

It might make sense to use effects to control resource usage of code, e.g., we could have effects like

michaellilltokiwa commented 7 months ago
michaellilltokiwa commented 5 months ago

A variant of these effects could be not the imitation of resources but tracking the amount of resources used and give a summary after execution.

michaellilltokiwa commented 4 months ago

In the same vein as halts: koka has a diverge effect. Apparently code may not diverge unless it uses this effect. https://github.com/koka-lang/koka/blob/ce2178d945338edd5a4584b7c89e320816f16a18/doc/spec/tour.kk.md?plain=1#L570