As a Math and Category Theory fan, I so much wish programming was the same:
Formal. Pure. Unambiguous.
But it’s not.
It’s always nice when you can leverage some math properties and write elegant correct software. And it sure feels nice to ignore the real world and pretend you do math in programming.
But Programming Languages are communication tools.
They communicate the developer intent to the machine. But they also communicate the developer intent to another human being.
This is a very unique position.
Computers are great because they do exactly what you tell them to do.
Computers are terrible because they do exactly what you tell them to do.
When a program is compiled, it’s a perfectly unambiguous process that follows the compiler logic.
But when a human reads code, it’s not so unambiguous anymore.
Moreover, mature programming languages usually have multiple overlapping features. So even for compilers it’s not always clear what you wrote.
Programming Isn't Math, It's Linguistics.
Compilers and Humans have the same problem. We're all terrible at understanding each other.
Join me for some formal language theory, a lot of C++, and some "recreational" insults.