You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for functions running at compile time. i.e.:
@macro(comptime)
def print_hello(): str {
print("Hello from the compiler!");
return"A";
}
def main() {
// is run in compile time and// a will always be the value "A"// returned in `print_hello`
let a = print_hello();
}
The text was updated successfully, but these errors were encountered:
Considering that the language will have a REPL and therefore an interpreter, i think making all expressions evaluate-able at comptime will be effortless
Considering that the language will have a REPL and therefore an interpreter, i think making all expressions evaluate-able at comptime will be effortless
The interpreter (and comptime) can most likely just be built on top of LLVM's JIT APIs, which should make it even easier since we can leverage metal-llvm's codegen. We could also probably explore using Cranelift for the repl too if we really want fast build times.
Considering that the language will have a REPL and therefore an interpreter, i think making all expressions evaluate-able at comptime will be effortless
The interpreter (and comptime) can most likely just be built on top of LLVM's JIT APIs, which should make it even easier since we can leverage metal-llvm's codegen. We could also probably explore using Cranelift for the repl too if we really want fast build times.
Add support for functions running at compile time. i.e.:
The text was updated successfully, but these errors were encountered: