Closed Akuli closed 1 year ago
Sometimes it's useful to have a "do nothing" statement, like a pass statement in Python. In Jou I used this:
pass
https://github.com/Akuli/jou/blob/ba844331ec27263a61180fa68c9029a63e2e5099/self_hosted/tokenizer.jou#L315-L317
And for a function that does nothing (and also returns nothing), you can use the return keyword:
return
https://github.com/Akuli/jou/blob/ba844331ec27263a61180fa68c9029a63e2e5099/tests/already_exists_error/func.jou#L1-L2
Both of these feel like workarounds and I think I should just add a pass statement.
Sometimes it's useful to have a "do nothing" statement, like a
pass
statement in Python. In Jou I used this:https://github.com/Akuli/jou/blob/ba844331ec27263a61180fa68c9029a63e2e5099/self_hosted/tokenizer.jou#L315-L317
And for a function that does nothing (and also returns nothing), you can use the
return
keyword:https://github.com/Akuli/jou/blob/ba844331ec27263a61180fa68c9029a63e2e5099/tests/already_exists_error/func.jou#L1-L2
Both of these feel like workarounds and I think I should just add a
pass
statement.