Another <discussion in this thread> reminded me of...
# thinking-together
k
Another discussion in this thread reminded me of a paper on linguistics and programming languages that I read a while ago. The paper is in French, but in the days of automatic translation that shouldn't be a problem any more (OK, I admit I never tried to have a whole paper translated). It discusses the differences between formal languages used in CS theory (e.g. lambda calculus) and formal languages used to write actual programs, and notes that the latter have many characteristics of natural human languages that one wouldn't expect in formal systems from a purely formal point of view. Examples given are traces of historical evolution, such as traces of K&R C in ANSI C, redundancies such as multiple formally equivalent loop constructs (while / until etc.), expletives such as no-ops and comments, etc. Another argument is the existence of a "literature", e.g. the Unix source code as a literature for C.
Another natural-language feature in PLs (in fact the one that made me read that paper) is the use of names as references to the context of a program's application domain that are superfluous for machine execution but often essential for human readers. I suspect that this is the main reason why point-free programming hasn't made it into practice.
Is anyone aware of other work on the relation of PLs to natural languages?
g
Meles Philological Approach EN 2.pdf
k
Thanks @guitarvydas, that's a pretty good translation! No obvious mistakes on a quick scan, not even the frequent one made by early translation tools that translated the titles in the reference section.
g
I got Claude Sonnet 4.6 to do the translation. I don't know enough French to compare the original against the translation.
As I read the paper, a couple of thoughts crossed my mind: • AFAICT, no definition of "theoretical language" or "concrete language" is given. • To my understanding, it is incorrect to say that C enabled the creation of UNIX. UNIX was written in assembler. Later, UNIX V4 was written in K&R C (which is not what is called C today). According to Claude, UNIX wasn't even the first O/S written in a high level language. Multics was written in PL/I (but became too unwieldy). Multics' predecessor was written in assembler.
And everything executable by a computer is a formal language.
This is an interesting demonstration of the extreme psychological power of words. I read the paper with a different understanding of what constitutes a “formal language.” My definition excludes assembler, while the definition above appears to include it. The limits of mathematical computation applied to physical hardware
k
Yes, assembler is included. Also machine opcodes.