The first example ("idiom") is bit tricky, because the title is "Creating an empty file". An alternative would for example be
echo -n > example.txt
Both fit the description of "Creating an empty file". Is it idempotent, or more or less so than `touch example.txt`? If there is already an existing file, then touching it obviously will not empty it, so the end state is not "empty file exists" like one would expect from operation "Creating an empty file"Ironically article calls "This is an easy one"