Hacker News new | ask | show | jobs
by jcl 6198 days ago
Yes, ALGOL-derived languages contain English words, and chunks of code can be read as English if you imagine the right words being inserted, but the same is true of Scheme code, and to about the same extent. In fact, it's true of most programming languages. The languages that it is most true of -- languages like Ada, Cobol, Inform, etc. -- are not notable as good beginners' languages.

Here, for example, is typical C code, right out of K&R:

  for (count = 0; count < MAX; count++)
    printf("\narr[%d] = %d.", count, arr[count]);
To read this in English, you need to fabricate a lot of words, like this: "Repeat for several times, first initializing count to zero, as long as count is less than MAX and, after each step, taking count and adding one to it: call the printf function with the arguments...". How is that exercise any worse for the equivalent PLT Scheme code?

  (for ([count (in-range 0 MAX)])
    (display (format "\narr[~a] = ~a." count (vector-ref arr count))))
An English translation of C's "while" statement is easier; the "switch" statement is harder; a C function declaration is nearly impossible without sounding awkward. Yes, actual ALGOL would be easier translate to English than C, but there are even less people starting with ALGOL than with your hypothetical assembler -- which suggests that the real reason people start with the languages they do is primarily because the languages are popular, not because of the degree of similarity to English.