Closed Akuli closed 1 year ago
There is currently no good way to do assert(). C's assert() is a macro, not a function, so you can't just declare it and use it in Jou.
assert()
You can define your own assert() function but it has some disadvantages:
assert(False)
I think the real solution is a built-in assert statement, similar to Python and Java.
assert
There is currently no good way to do
assert()
. C'sassert()
is a macro, not a function, so you can't just declare it and use it in Jou.You can define your own
assert()
function but it has some disadvantages:assert(False)
is unreachable.I think the real solution is a built-in
assert
statement, similar to Python and Java.