Specializations > Typology and Descriptive Linguistics

Describing programming languages in linguistic terms

(1/2) > >>

What do you guys think, can pointers in programming languages be correctly described as pronouns?

Certainly you can describe programming languages like natural languages, but for the most part you will just be making analogies rather than really finding substantive similarities. There are some similarities, of course, such as argument structure, but the entire format of programming languages is very different. Procedural languages are, in the broadest sense, something like imperatives, and they work differently from most natural language discourse. The hierarchical relationships, though present in both, are also very different. If you look instead at declarative languages, there is a little more similarity, but I'd say that's mostly surface-level too.

As for pronouns in particular, you could call pointers, variables, and various other things 'anaphors' in the sense that they point back to some other reference (they have antecedents), but they don't function like pronouns in natural languages beyond that. For example if you look into Generative Grammar (specifically Government and Binding) you will find that Binding Theory makes some observations about when pronouns can appear-- reflexives are always within a clause with their antecedent, pronouns are not but do usually require some context, and normal nouns are never embedded in the way that pronouns can be, etc. See more about Conditions A, B and C here: https://en.wikipedia.org/wiki/Binding_(linguistics) -- and there are simply no parallels in a structural sense to programming languages.

So, can you do it? Yes. Is it meaningful beyond analogy? Probably not too much.

One substantial difference between natural languages and programming languages is that the former are extremely ambiguous, while the latter should never be. There are reasons for that, and also for other fundamental differences.

So overall, you need to decide if you're looking just for description (which you can do any way you'd like) or some kind of explanation (which must get at some deeper level of analysis). To think about that more, it might be worth reading Haspelmath's paper "Pre-established categories don't exist-- consequences for language description and typology" here: https://www.degruyter.com/view/j/lity.2007.11.issue-1/lingty.2007.011/lingty.2007.011.xml or http://www.eva.mpg.de/fileadmin/content_files/staff/haspelmt/pdf/Preestablished.pdf
While Haspelmath's perspective is controversial (some linguists would say that you can identify and compare the 'same category' in different languages!), the points he makes are important if you want to think about the difference between description and explanation. He is in fact (and continues to be!) a comparative linguist (typologist) despite making the arguments he does. You can compare languages regardless of whether they are really 'the same', but getting to a level of explanation requires more than that.

I don't know. Don't you think that there is some limit in details in which you can describe any particular language? That, after some relatively small number of rules, not even the native speakers of the same dialect would agree what's grammatical and what isn't? I mean, yes, you can find an almost exceptionless rule in some unexpected part of a language, like that it's grammatical to say "Oh yeah!" but not to say "Yeah oh!". But that doesn't mean that language is completely predictible and that it makes sense to invent a new class of words in an attempt to describe language in details that probably don't even really exist.

There we two distinct questions:
1. Do all speakers of "English" have exactly the same grammar rules? (No. There is a lot of dialectal and even speaker-level variation. In fact many linguists like Chomsky don't even consider "languages" in the sense of "English" etc. to be relevant theoretical constructs. Each person has a unique internal grammar, which Chomsky calls i-language for example.)
2. Are individuals consistent in the application of linguistic rules? (Yes, generally. But there are some claims about some rules being probabilistic. That's an interesting area of current research.)

Well, when speaking a foreign language, I am obviously not consistent in my application of grammar rules. Why does anybody think people are completely consistent when speaking their native language?


[0] Message Index

[#] Next page

Go to full version