3 ms·
One reason you might want an explicit keyword is so that it fails to compile if it can't be calculated at compile time, which is what was intended, rather than
by trealira 2y ago
One reason you might want an explicit keyword is so that it fails to compile if it can't be calculated at compile time, which is what was intended, rather than fall back to calculating it at runtime. It also seems useful as an ad-hoc method of annotating pure functions; those functions are guaranteed not to modify global variables at runtime or do I/O.
- Svoka 2y agoI guess so... This is reason for `consteval` and such.