I’m a computer programmer. When we test programs, we often use a function called “assert” to check if the program produces the conditions we expect.

For example, this test will fail if the + produces an incorrect result:

assert( 2 + 3 ).equals(5)

Another meaning of “assert” in programming is “check, and take action, if necessary”. For instance, the procedure assertDataPresent() may check if the data has already been loaded. If it hasn’t, the function would try to do so, so that in either case the data is present after the procedure is executed.

Which of these meanings is the more common one in regular English? Can “assert” even be used in these ways outside programming?

  • galilette@mander.xyz
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    This. It’s about explicitly stating the assumptions that will be crucial to the rest of the proof/work/program/whatever, so there will be no misunderstanding going forward. In other words, defining the boundary of the problem to be considered.