Judge Patel, in the Bernstein case, explained why the First Amendment protects code, recognizing that there was:
“no meaningful difference between computer language, particularly high-level languages …, and German or French … Like music and mathematical equations, computer language is just that, language, and it communicates information either to a computer or to those who can read it. ... source code is speech.”
The Sixth Circuit agreed, observing in Junger v. Daley, that code, like a written musical score, “is an expressive means for the exchange of information and ideas.” Indeed, computer code has been published in physical books and included in a famous Haiku. More directly, Jonathan Mann recently expressed code as music, by singing portions of the Tornado Case codebase.