4 ms·
I have had a strange intellectual interest in the "human-language-likeness" of programming languages for a long time. (In a way, I suppose it is the core of my
by marttt 6y ago
I have had a strange intellectual interest in the "human-language-likeness" of programming languages for a long time. (In a way, I suppose it is the core of my original question.) Which existing languages seem to be closest to that "metre and rhyme" point in your opinion? Lisp, Forth, Perl, Rebol?
I found an interesting recent discussion on Lambda the Ultimate about human cognition, coding, and programming language syntax:
http://lambda-the-ultimate.org/node/5614 http://lambda-the-ultimate.org/node/5614
The MIT neuroscience research that this LtU thread refers to was also discussed on HN:
https://news.ycombinator.com/item?id=25434854 https://news.ycombinator.com/item?id=25434854
And another HN thread on perceiving code vs written word:
https://news.ycombinator.com/item?id=7091495 https://news.ycombinator.com/item?id=7091495
- pjc50 6y ago> Which existing languages seem to be closest to that "metre and rhyme" point in your opinion? Lisp, Forth, Perl, Rebol? Perl can be close to this, and Larry Wall was fond of this aspect of the language, but it's also one of the most sigil-infested languages that isn't APL. APL itself stands proudly at the other end of the spectrum, for pure mathematicians. Lisp has the problem that brackets aren't readily pronouncable and deeply-nested clauses aren't idiomatic English. Although I have noticed that programmers are far more likely to speak English with nested clauses than non-programmers. Forth relies too heavily on the stack for my taste; ideally for me languages specify the variables they operate on by name, although an English-like language could clearly use "it" in the way that Perl uses "$_". Rebol, like LOGO, is clearly Lisp with square brackets. Tcl is another candidate in this area that I have a soft spot for, but its reliance on string operations means it needs escape characters a lot. Ironically I think the closest may be COBOL and its predecessor, Grace Hopper's FLOW-MATIC. These languages "correctly" end statements with a full stop "." rather than the unnatural semicolon ";" or the invisible newline. The problem is that COBOL pre-dates structured programming and object orientation by a long way. I don't think attempting to adapt them directly would be a good idea, but building something with some of the same principles might work.