3 ms·
For those interested in effect systems, here is a description of the effect system in Nim: https://nim-lang.org/docs/manual.html#effect-system https://nim-lang.
by dom96 8y ago
For those interested in effect systems, here is a description of the effect system in Nim: https://nim-lang.org/docs/manual.html#effect-system https://nim-lang.org/docs/manual.html#effect-system
- dwohnitmok 8y agoOoo... Interesting! Are these significantly different from Java's checked exceptions (the reader and writer ones look interesting, but unfortunately are not yet implemented)?
- yawaramin 8y agoI'm very interested in Nim's effect system. I have a few questions about it: * Does it have a way to define effect handlers in a decoupled way from the effects? I'm looking for something like this: https://koka-lang.github.io/koka/doc/kokaspec.html#sec-a-primer-on-effect-handlers https://koka-lang.github.io/koka/doc/kokaspec.html#sec-a-pri... * Are all standard library procs marked with all their actual effects? * How complete is compile-time effect tracking right now? For example, the following doesn't raise a compile error: proc testEffects() {.tags: [].} = "hi".echo testEffects() * Is there a 'strict effect' mode, that would implicitly add `{.tags: [].}` to all proc types without an explicit tags pragma? That would make effect tracking more, well, effective.