you are viewing a single comment's thread
view the rest of the comments
[–] 4 points 8 months ago* (last edited 8 months ago)

This is a great article. I just want to highlight this insane behavior in particular (slightly dramatized):

set -e

safeDelete() {
  false

  # Surely we don't reach this, right?
  echo "rm $@ goes brr..."
}

if safeDelete all of my files; then
    : # do more stuff
fi

Frankly if you actually need robustness (which is not always), you should be using a real programming language with exceptions or result types or both (i.e. not C). UNIX processes are just not really up to the task.

  • source
  • parent