4 ms·
> So excited for this addition! I've been using it for a while in the devel version (Nim v0.18.1), and it is great — I like it very much and I completely under
by narimiran 8y ago
> So excited for this addition!
I've been using it for a while in the devel version (Nim v0.18.1), and it is great — I like it very much and I completely understand your excitement!
Before I didn't bother with {.noSideEffect.} pragma, and now with `func` here — my code is much more clear (at least to me ;)), and I can immediately tell which of my procs are 'pure'.
- k__ 8y agoWhat does it do?
- tyingq 8y agoIt does some static enforcement of "no side effects[1]". [1]https://en.m.wikipedia.org/wiki/Side_effect_(computer_science) https://en.m.wikipedia.org/wiki/Side_effect_(computer_scienc...
- Buttons840 8y agoHow? Even Haskell, who makes a big deal out of separating pure vs impure code, can't do it perfectly.
- tyingq 8y agoI don't think they claim they do it perfectly. You can find bugs related to that, false negatives and positives.
- Buttons840 8y agohttps://nim-lang.org/docs/manual.html#pragmas-nosideeffect-pragma https://nim-lang.org/docs/manual.html#pragmas-nosideeffect-p... It looks really impressive.
- emmelaich 8y ago"Haskell is the world’s best imperative programming language"