Hacker News new | ask | show | jobs
by avinassh 1207 days ago
how does the scoping works? From the homepage:

    import os

    text := os.read_file('app.log') or {
        eprintln('failed to read the file: ${err}')
        return
    }

    lines := text.split_into_lines()
    for line in lines {
        if line.starts_with('DEBUG:') {
            println(line)
        }
    }
Is lines empty or program exited after the error at `app.log`
1 comments

If there's an error at reading app.log, the error is printed, and the function is returned.

Code after that won't run at all.