These are similar to repeats, except that they branch.
Also, there are other "commands" for technique, such as , for "pause and breathe," ties and slurs, rubato, and glissando for how you connect the notes, crescendo/diminuendo, fortes and pianos, for volume control, etc. There are a lot of these "object oriented" touches. Consider the zigzag "trill".
There is also another branch type "command" that you don't see very often outside of orchestral music, which is marked fp. Visually it looks like the normal forte or piano, except instead of referring to any time the segment is played, the first time through is played louder than the following time(s).
And those STILL aren't all the different branching commands. There are numbered brackets, slashes on note stems, slashes through some of the symbols I've mentioned above. Lots and lots of flow control.
And if that's not enough, there are instrument-specific "commands" for things like pedals (on a piano) or bow techniques (on violin) and slides (on guitar) etc.
So, personally I believe OP is correct in thinking written music (and tabulature) are programming languages.