Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That could be said for any language. It's just that the first language someone usually learns borrows more from algol than from lisp. This leads to the idea that Python/Ruby/PHP/Javascript are easier to learn than Clojure/Common Lisp/Scheme.


Python/Ruby/PHP/Javascript are easier to learn because most people already know a similar language. Just because it seems unfair doesn't mean it's not true.


Python and Ruby do one particular thing right that Smalltalk didn't:

Operator Precedence for Algebras.

Implementing an Algebra is a very important thing for a language to be good at. Being able to use algebras without having to switch mental gears is a good thing for scientists, mathematicians, and technical people of all stripes.

IMHO, the ability to easily implement your own algebra is a hallmark of a great language. Having that with the operator precedence is a bit of very justified syntactic sugar.


Algol languages are taught first for good reason: Algol-derived languages resemble English; Lisp isn't natural or intuitive to anyone who doesn't already know Lisp.


Oh, come on, folks. It's a perfectly reasonable comment -- Lisp is powerful and expressive, but it is not an intuitive language for beginners.


Perhaps it seems that way to you because you are more familiar with Algol syntax than Lisp syntax, or because you have gone on to learn the more advanced Lisp features. But Scheme syntax and semantics, for example, are arguably at least as simple as that of an Algol language. Scheme has been used successfully as a first programming language in high school computer science courses: http://www.teach-scheme.org/


You're making a bad assumption about my skill and preferences, and trying to use it as an argument. That's a logical fallacy. My argument doesn't depend on my personal experience: Algol-derived languages resemble English, and are therefore easier for new programmers to learn.

While I am sure that some high school courses may start with Scheme, it's certainly not a common beginner's language. I'm sure if I searched hard enough, I could find a high school class learning assembly -- but that doesn't make assembly a good beginner's language, either.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: