3 ms·
Online playground! So it compiles to WASM? If you are gonna look like Rust. Please, no unwrap() everywhere.
by chaosprint 4y ago
Online playground! So it compiles to WASM?
If you are gonna look like Rust. Please, no unwrap() everywhere.
- tibordp 4y agoNo native compilation to WASM yet, but since the compiler outputs self-contained C, it should be fairly easy to do it with Emscripten. The sandbox is running the code server-side in a nsjail container. As for unwrap, I feel you! the try expression (expr?) is supported, which makes it look a bit nicer, but I'm still trying to figure out a good idiom for when you actually want to do specific things based on whether the result is ok or err. Alumina does not have Rust-style enums (tagged unions) or the match construct, which makes it a bit tricky.