Well, I'm gonna have to sleep on this @rustlang puzzle. I gotta figure out how to get Rust to reliably find a javascript file that should be included with its build. I think I'm gonna have to do a whole artifact generation/release process thing for this to work at all :s
I'm unsure about the specifics of the rules, but what you're saying sounds about right. Though I believe that constraint would still be upheld? If the same function is run from the same location it'd yield the same output during both compilation and runtime, would it not?
-
-
Also with proc macros we're already able to do all sorts of fun side effects during compilation. Writing files would be useful as const too. The hardest part of that tho is guaranteeing deterministic builds, so e.g. making sure paths that are written to aren't read back out.
-
Sure, and honestly I'm a fan of it in some cases. Like I said upthread, I have a password app that builds the word lists directly into the binary after generating them from paintext. But macros unconditionally execute at compile time, whereas const fns are supposed to be either.
End of conversation
New conversation -
-
-
No? If you compile your program and then edit ~/.config/app/config.yaml, you're going to see a different configuration
-
Ah, like that. I don't think that's a guarantee folks are going for. That seems closer to a "no side effects" interpretation of const fns, but include_bytes! and env! already interact with the environment so this wouldn't be much different.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
).