Compile time $if for non -prod builds, for debugging purposes, like put println of variables.
I don't know if that it's planned.
$if debug { ?
Awesome idea!
Done. This program will print "hello" if built with -debug:
fn main() {
$if debug {
println('hello')
}
}
Could you document it somewhere? Maybe:
https://vlang.io/docs#comp_if
A lot of thanks!!
Documentation has been updated.
Most helpful comment
$if debug {?