Yes, of course there is a connection through the Chomskian mathematization of syntax.
But when we think about solving problems over domains and relations (e.g think about realizing that the problem of parsing requires traversing a tree like structure) we are dealing with mathematical-logical structures, not linguistic concepts. This is what I meant. I've seen a lot of OOP code that tried desperately to make code reflect the fuzzier relationships between linguistic concepts, rather than the precise ones of logical structure (a lot of this is a consequence of over-encapsulation and excessive information hiding)
I slightly disagree on the specific point, but agree on the broader point.
Formal grammar is not merely a notation for expressing linguistic rules that incidentally makes them appear akin to maths, it's a theory about what language is - a phenomenon rooted in, and best modelled by, formal logic. The reason formal grammar looks familiar to programmers is because computer science has borrowed tons of concepts from linguistics, concepts originally aimed at modelling human language.
I agree with you on OOP. In a way, popular ideas about language are not unlike OOP: naive models with inherent contradictions that inevitably devolve into an incoherent mess.
Ultimately, a person with a naive conception of how words, objects, and ideas interact is going to make a mess of trying to systematise virtually anything.
But when we think about solving problems over domains and relations (e.g think about realizing that the problem of parsing requires traversing a tree like structure) we are dealing with mathematical-logical structures, not linguistic concepts. This is what I meant. I've seen a lot of OOP code that tried desperately to make code reflect the fuzzier relationships between linguistic concepts, rather than the precise ones of logical structure (a lot of this is a consequence of over-encapsulation and excessive information hiding)