Hey, thanks for replying! > But in a nutshell if something is pure it should support substitution. Neat, hadn't thought about it like that before. > If you substitute x into the body of y you get a different result!…
> That always has to be true, no? Reading from a mutable datastructure is impure in the same way that reading from standard input is. If the function internally reads from stdin, I'd agree. But if a fn takes an input…
While it may be faster, the "by definition" part hasn't been true for years. The JVM can do some amazing stuff at runtime to outpace statically executed code. Regardless, their principles [1] make the trade-offs clear:…
It just struck me as odd for reads like `find` (which itself requires a pure fn arg). Is that because given the same reference, the function could yield different outputs? Or because it could be mutated concurrently?…
Pure speculation on my part (since I couldn't find any details either): their "Closed world assumption" and "No reflection" principles [1] could mean the compiler can output radically different bytecode, e.g.,…
> Personally I find the inclusion of Datalog as a first-class citizen in an otherwise functional language to be a pretty powerful feature that I personally haven't really seen done before. It's neat, but IIUC, it…
Reading through the Design Principles [1]: > Separate pure and impure code So IIUC, the effect system [2] means impurity is contagious. This seems reasonable to me, though I wonder what that means in practice.…
Hey, thanks for replying! > But in a nutshell if something is pure it should support substitution. Neat, hadn't thought about it like that before. > If you substitute x into the body of y you get a different result!…
> That always has to be true, no? Reading from a mutable datastructure is impure in the same way that reading from standard input is. If the function internally reads from stdin, I'd agree. But if a fn takes an input…
While it may be faster, the "by definition" part hasn't been true for years. The JVM can do some amazing stuff at runtime to outpace statically executed code. Regardless, their principles [1] make the trade-offs clear:…
It just struck me as odd for reads like `find` (which itself requires a pure fn arg). Is that because given the same reference, the function could yield different outputs? Or because it could be mutated concurrently?…
Pure speculation on my part (since I couldn't find any details either): their "Closed world assumption" and "No reflection" principles [1] could mean the compiler can output radically different bytecode, e.g.,…
> Personally I find the inclusion of Datalog as a first-class citizen in an otherwise functional language to be a pretty powerful feature that I personally haven't really seen done before. It's neat, but IIUC, it…
Reading through the Design Principles [1]: > Separate pure and impure code So IIUC, the effect system [2] means impurity is contagious. This seems reasonable to me, though I wonder what that means in practice.…