But linguists have approached this question from time to time! The main stumbling block is highly literate people are inclined to think of writing as language but it's not, quite. You can have multiple writing systems for the same spoken language, or be fluent but illiterate. But you can't comprehend a writing system for a language you can't speak, barring disability.
So programming languages do have grammar, but not the other components of a language. Idioms in programming are a metaphor referencing linguistic idioms but structurally they aren't the same. Programming languages are more similar to writing systems, and a lot of linguistics findings do apply to them when taken in that context.
You can play around with this idea if you want. Try to convey meaning to someone using only a programming language and nothing else. This is tricky because they embed our other writing systems, so you need to be careful not to accidentally convey meaning with eg variable names. Might be best to use something like brainfuck or piet that prevents that entirely. If it's a language in the "human languages" sense, you'll be able to convey any arbitrary meaning to another person who knows that programming language, even if you don't share a spoken one.
What ends up happening is you can only do this if you reference a shared spoken language. So you can warp a PL into a writing system, but you can't use it alone to communicate.